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])))

-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])))