I have a theoretical question. Consider this 4-pole black box, what connections inside it are required for it to have gain more than 1?

I am only certain about 2 connections:
1. there must be connection between input and output (otherwise signal would not be able to pass.
2. there must be connection between vcc and out (otherwise there would be no gain > 1, it needs power)
But I'm not sure about other connections. It is possible to have gain > 1 without:
3. gnd to out
4. vcc to gnd
5. in to gnd
6. in to vcc