High-gain monolithic 3D CMOS inverter using layered semiconductors