For the following figure:

what is the ouput if
a) both inputs are low
b) if one input is high and one low
c) does the circuit act like an OR or AND gate
I understand that the output for the first part of the circuit is 1 if both inputs are low only. I am confused about the connection between the first and second part of the circuit.