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

print((max([a*c,a*d,b*c,b*d])))

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

ans=[]

for X in [a,b]:

  for Y in [c,d]:

    ans.append(X*Y)

print((max(ans)))

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

a, b, c, d = list(map(int, input().split()))
ans = []
for X in [a, b]:
    for Y in [c, d]:
        ans.append(X * Y)
print((max(ans)))

-print((max([a * c, a * d, b * c, b * d]))) +ans = [] +for X in [a, b]: +    for Y in [c, d]: +        ans.append(X * Y) +print((max(ans)))