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



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



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



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

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

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