A, B = list(map( int, input().split()))



C = [ A + B, A - B, A * B]



print((max(C)))



A, B = list(map( int, input().split()))



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

A, B = list(map(int, input().split()))
print((max(A + B, A - B, A * B)))

-C = [A + B, A - B, A * B] -print((max(C))) +print((max(A + B, A - B, A * B)))