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



x = a[0] + a[1]

y = a[0] - a[1]

z = a[0] * a[1]



if x >= y and x >= z:

  print(x)

elif y >= x and y >= z:

  print(y)

else:

  print(z)





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



x = a[0] + a[1]

y = a[0] - a[1]

z = a[0] * a[1]



print((max([x,y,z])))



a = list(map(int, input().split()))
x = a[0] + a[1]
y = a[0] - a[1]
z = a[0] * a[1]
if x >= y and x >= z:
    print(x)
elif y >= x and y >= z:
    print(y)
else:
    print(z)

a = list(map(int, input().split()))
x = a[0] + a[1]
y = a[0] - a[1]
z = a[0] * a[1]
print((max([x, y, z])))

-if x >= y and x >= z: -    print(x) -elif y >= x and y >= z: -    print(y) -else: -    print(z) +print((max([x, y, z])))