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 = max(a*c, a*d, b*c, b*d)

print(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 = max(a * c, a * d, b * c, b * d)
print(ans)

-print((max(a * c, a * d, b * c, b * d))) +ans = max(a * c, a * d, b * c, b * d) +print(ans)