If Pmos is connected down and Nmos on top ,
For input logic 0:
Pmos ON and Nmos OFF => output is grounded or logic zero (it will not be zero but Vtp)
For input logic 1:
Pmos OFF and Nmos ON => output is connected to VDD or logic one (it will not be ONE but VDD-Vtp)