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

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

print(ans)

from itertools import product

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

print((max(v[0] * v[1] for v in product((a, b), (c, d)))))

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

from itertools import product

a, b, c, d = list(map(int, input().split()))
print((max(v[0] * v[1] for v in product((a, b), (c, d)))))

+from itertools import product + -ans = max(a * c, a * d, b * c, b * d) -print(ans) +print((max(v[0] * v[1] for v in product((a, b), (c, d)))))