a,b,c,d = list(map(int, input().split()))

t = list()

ac = a*c

bc = b*c

ad = a*d

bd = b*d

t.append(ac)

t.append(bc)

t.append(ad)

t.append(bd)

ans = -1 * 10**18

for i in range(4):

  ans = max(t[i],ans)

print(ans)
a,b,c,d = list(map(int, input().split()))



ans = max(a*c, a*d, b*c, b*d)

print(ans)
a, b, c, d = list(map(int, input().split()))
t = list()
ac = a * c
bc = b * c
ad = a * d
bd = b * d
t.append(ac)
t.append(bc)
t.append(ad)
t.append(bd)
ans = -1 * 10**18
for i in range(4):
    ans = max(t[i], ans)
print(ans)

a, b, c, d = list(map(int, input().split()))
ans = max(a * c, a * d, b * c, b * d)
print(ans)

-t = list() -ac = a * c -bc = b * c -ad = a * d -bd = b * d -t.append(ac) -t.append(bc) -t.append(ad) -t.append(bd) -ans = -1 * 10**18 -for i in range(4): -    ans = max(t[i], ans) +ans = max(a * c, a * d, b * c, b * d)