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

li = [a+b, a-b,a*b]

print((max(li)))

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

print((max(a+b,a-b,a*b)))
a, b = list(map(int, input().split()))
li = [a + b, a - b, a * b]
print((max(li)))

a, b = list(map(int, input().split()))
print((max(a + b, a - b, a * b)))

-li = [a + b, a - b, a * b] -print((max(li))) +print((max(a + b, a - b, a * b)))