TTL NAND and AND gates

Suppose we altered our basic open-collector inverter circuit, adding a second input terminal just like the first: