Three input cmos gate