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



C1 = A + B



C2 = A - B



C3 = A * B



C = [ C1, C2, C3]



C = sorted(C)



print((C[2]))

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



C1 = A + B



C2 = A - B



C3 = A * B



C = [ C1, C2, C3]



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

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

-C = sorted(C) -print((C[2])) +print((max(C)))