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



mymax = -99999



if mymax < A + B:

  mymax = A + B



if mymax < A - B:

  mymax = A - B



if mymax < A * B:

  mymax = A * B





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



mymax = -999



if A+B > mymax:

    mymax = A+B

if A-B > mymax:

    mymax = A-B

if A*B > mymax:

    mymax = A*B

print(mymax)
A, B = list(map(int, input().split()))
mymax = -99999
if mymax < A + B:
    mymax = A + B
if mymax < A - B:
    mymax = A - B
if mymax < A * B:
    mymax = A * B
print(mymax)

A, B = list(map(int, input().split()))
mymax = -999
if A + B > mymax:
    mymax = A + B
if A - B > mymax:
    mymax = A - B
if A * B > mymax:
    mymax = A * B
print(mymax)

-mymax = -99999 -if mymax < A + B: +mymax = -999 +if A + B > mymax: -if mymax < A - B: +if A - B > mymax: -if mymax < A * B: +if A * B > mymax: