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



ans = b*d

ans = max(ans, a*c)

ans = max(ans, b*d)

ans = max(ans, a*d)

ans = max(ans, b*c)

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

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

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