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

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

l=[a*c,a*d,b*c,b*d]

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

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

-print((max(max(max(a * c, a * d), b * c), b * d))) +l = [a * c, a * d, b * c, b * d] +print((max(l)))