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



minx = min(a, b)

miny = min(c, d)

maxx = max(a, b)

maxy = max(c, d)



print((max(miny * minx, maxx * maxy, maxx * miny, minx * maxy)))

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



print((max(a * c, b * d, b * c, a * d)))
a, b, c, d = list(map(int, input().split()))
minx = min(a, b)
miny = min(c, d)
maxx = max(a, b)
maxy = max(c, d)
print((max(miny * minx, maxx * maxy, maxx * miny, minx * maxy)))

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

-minx = min(a, b) -miny = min(c, d) -maxx = max(a, b) -maxy = max(c, d) -print((max(miny * minx, maxx * maxy, maxx * miny, minx * maxy))) +print((max(a * c, b * d, b * c, a * d)))