t=1

for a in sorted([*open(0)][1].split()):t=(-1,t:=t*int(a))[0<=t<=1e18]

print(t)
t=1

for a in[*open(0)][1].split():t=(-1,t:=t*int(a))[0<=t<=1e18]

print(t)
t = 1
for a in sorted([*open(0)][1].split()):
    t = (-1, t := t * int(a))[0 <= t <= 1e18]
print(t)

t = 1
for a in [*open(0)][1].split():
    t = (-1, t := t * int(a))[0 <= t <= 1e18]
print(t)

-for a in sorted([*open(0)][1].split()): +for a in [*open(0)][1].split():