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



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

c= A+B

d= A-B

e= A*B

f=max(c, d, e)

print(f)
temp = list(map(int, input().split()))
print((max([temp[0] + temp[1], temp[0] - temp[1], temp[0] * temp[1]])))

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

-temp = list(map(int, input().split())) -print((max([temp[0] + temp[1], temp[0] - temp[1], temp[0] * temp[1]]))) +A, B = list(map(int, input().split())) +c = A + B +d = A - B +e = A * B +f = max(c, d, e) +print(f)