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

print((int(max(a*b,c*d))))

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

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

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

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