Set 2 pins to wakeup from System ON and OFF, and know which pin was pressed

I want to configure two pins to be able to wake up both from System ON and OFF and know which pin was pressed

is it possible?