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

b = [a[0]+a[1],a[0]-a[1],a[0]*a[1]]

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

print((max(A+B,A-B,A*B)))
a = list(map(int, input().split()))
b = [a[0] + a[1], a[0] - a[1], a[0] * a[1]]
print((max(b)))

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

-a = list(map(int, input().split())) -b = [a[0] + a[1], a[0] - a[1], a[0] * a[1]] -print((max(b))) +A, B = list(map(int, input().split())) +print((max(A + B, A - B, A * B)))