a=[int(x) for x in input().split()]

b=[a[0]*a[2],a[0]*a[3],a[1]*a[2],a[1]*a[3]]

print((max(b)))
a=[int(x) for x in input().split()]

#(a)

#b=[a[0]*a[2],a[0]*a[3],a[1]*a[2],a[1]*a[3]]

print((max(a[0]*a[2],a[0]*a[3],a[1]*a[2],a[1]*a[3])))
a = [int(x) for x in input().split()]
b = [a[0] * a[2], a[0] * a[3], a[1] * a[2], a[1] * a[3]]
print((max(b)))

a = [int(x) for x in input().split()]
# (a)
# b=[a[0]*a[2],a[0]*a[3],a[1]*a[2],a[1]*a[3]]
print((max(a[0] * a[2], a[0] * a[3], a[1] * a[2], a[1] * a[3])))

-b = [a[0] * a[2], a[0] * a[3], a[1] * a[2], a[1] * a[3]] -print((max(b))) +# (a) +# b=[a[0]*a[2],a[0]*a[3],a[1]*a[2],a[1]*a[3]] +print((max(a[0] * a[2], a[0] * a[3], a[1] * a[2], a[1] * a[3])))