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