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

r = []

r.append(a + b)

r.append(a - b)

r.append(a * b)

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

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

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

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