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

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

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

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

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

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