a = list(map(int,input().split()))

x = a[0] * a[1]

y = a[2] * a[3]

if x >= y:

  print(x)

else:

  print(y)
a = list(map(int,input().split()))

b = a[0] * a[1]

c = a[2] * a[3]



if b > c:

  print(b)

else:

  print(c)
a = list(map(int, input().split()))
x = a[0] * a[1]
y = a[2] * a[3]
if x >= y:
    print(x)
else:
    print(y)

a = list(map(int, input().split()))
b = a[0] * a[1]
c = a[2] * a[3]
if b > c:
    print(b)
else:
    print(c)

-x = a[0] * a[1] -y = a[2] * a[3] -if x >= y: -    print(x) +b = a[0] * a[1] +c = a[2] * a[3] +if b > c: +    print(b) -    print(y) +    print(c)