Problem:


Score : 100 points

Problem Statement

We have two integers: A and B.

Print the largest number among A + B, A - B, and A \times B.

Constraints

All values in input are integers.

-100 \leq A,\ B \leq 100

Input

Input is given from Standard Input in the following format:

A B

Output

Print the largest number among A + B, A - B, and A \times B.

Sample Input 1

-13 3

Sample Output 1

-10

The largest number among A + B = -10, A - B = -16, and A \times B = -39 is -10.

Sample Input 2

1 -33

Sample Output 2

34

The largest number among A + B = -32, A - B = 34, and A \times B = -33 is 34.

Sample Input 3

13 3

Sample Output 3

39

The largest number among A + B = 16, A - B = 10, and A \times B = 39 is 39.



Sample input:
-13 3


Sample output:
-10

Submission status: Accepted

Solution code:
#AtCoder Beginner Contest 127
array = list(map(int, input().split()))

plus = array[0] + array[1]
minus = array[0] - array[1]
product = array[0] * array[1]

print(max(plus, minus, product))

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
print(sorted([a+b,a-b,a*b])[-1])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#n = int(input())
a,b = map(int, input().split())

count = 0
ans = a + b
mi= a - b
x = a * b

ans = max(ans, mi)
ans = max(ans, x)

print(ans)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

R = max(A + B, max(A - B, A * B))

print(R)

Submission status: Accepted

Solution code:
A,B = (int(x) for x in input().split())
list = [A+B,A-B,A*B]
list.sort()
print(list[2])

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
ans=max(A+B,A-B,A*B)
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
a = max(A+B, A-B, A*B)
print(a)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

ans = max(a+b, a-b)
ans = max(ans, a*b)

print(ans)

Submission status: Accepted

Solution code:
num1,num2 = map(int,input().split())
 
num3 = num1 + num2
num4 = num1 - num2
num5 = num1 * num2
num6 = [num3, num4, num5]
 
print(max(num6))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

c=a+b
if c<a-b :
  c=a-b
if c<a*b :
  c=a*b
print(c)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
print(max([a + b, a - b, a * b]))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
#n=int(input())
#m=int(input())
#r=[input() for _ in range(n)]
#p=list(map(int,input().split()))
ans=max(a*b,a+b,a-b)
print(ans)

Submission status: Accepted

Solution code:
num1,num2 = map(int, input().split())

plus = num1 + num2
minus = num1 - num2
times = num1 * num2

list = [plus,minus,times]

print(max(list))

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
a=i[0]+i[1]
b=i[0]-i[1]
c=i[0]*i[1]
if a>=b and a>=c:
  print(a)
elif b>=a and b>=c:
  print(b)
else:
  print(c)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))

x = a[0] + a[1]
y = a[0] - a[1]
z = a[0] * a[1]

print(max([x,y,z]))

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))

x = a[0] + a[1]
y = a[0] - a[1]
z = a[0] * a[1]

if x >= y and x >= z:
  print(x)
elif y >= x and y >= z:
  print(y)
else:
  print(z)

Submission status: Accepted

Solution code:
def solve(a, b):
    return max([a+b, a-b, a*b])

a, b = map(int, input().split())
print(solve(a, b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
plus = a + b
minus = a - b
multi = a * b

if plus > minus:
  maximum = plus if plus > multi else multi
else:
  maximum = minus if minus > multi else multi
  
print('{}'.format(maximum))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(max(max(a*b,a+b),a-b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if b > 0:
    if (a + b) > (a * b):
        print(a + b)
    else:
        print(a * b)
elif b == 0:
    print(a)
else:
    if (a - b) > (a * b):
        print(a - b)
    else:
        print(a * b)

Submission status: Accepted

Solution code:
# 富士山八合目の山小屋から新規AC
# 今回は風が強すぎて山頂を目指せませんでしたがまた挑戦したいですね

a, b = map(int, input().split())
print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

print(max([a + b, a - b, a * b]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

output = max([A+B,A-B,A*B])

print(output)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
def max(x,y):
    if (x > y):
        return x
    else :
        return y
   # return x > y ? x : y
ab = input().split(' ')
a = int(ab[0])
b = int(ab[1])

gg = max(a*b,max(a+b,a-b))
print(gg)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split(' ')]
result = [a+b, a-b, a*b]
print(max(result))

Submission status: Accepted

Solution code:
a,b = map(int, input().strip().split())
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

x = A + B
y = A - B
z = A * B

print(max(x, y, z))

Submission status: Accepted

Solution code:
def main(A,B):
    if A >= -100 and B <= 100:
        mul = A*B
        plus = A+B
        minus = A-B
        num = [mul,plus,minus]
    return max(num)

if __name__ == '__main__':
    s = list(map(int, input().split()))
    huga = main(s[0], s[1])
    print(huga)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
A,B = map(int,input().split())


X = A + B
Y = A - B
Z = A * B

print(max(X, Y, Z))

Submission status: Accepted

Solution code:
fs= [int(f) for f in input().split()]
a,b = fs[0],fs[1]
print(max(a+b,a*b,a-b))

Submission status: Accepted

Solution code:
import sys
a,b=map(int, input().split())

if a-b > a+b:
    if a-b > a*b:
        print(a-b)
    else:
        print(a*b)
elif a*b > a+b:
    if a*b > a-b:
        print(a*b)
    else:
        print(a-b)
else:
    print(a+b)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
d = raw_input().split()
a, b = d[0], d[1]
operators = ["+", "-", "*"]
current = None
soFar = None
for i in range(len(operators)):
    current = eval(a + operators[i] + b)
    soFar = max(current, soFar)
print(soFar)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
list = [A+B,A-B,A*B]
list.sort(reverse=True)
print(list[0])

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
P=A+B
M=A-B
K=A*B
print(max(P,M,K))

Submission status: Accepted

Solution code:
(lambda x, y: print(max(x+y, x-y, x*y)))(*map(int,input().split()))

Submission status: Accepted

Solution code:
i = list(map(int,input().split()))

a = i[0]
b = i[1]

plus = a + b
minus = a - b
add = a * b

list = [plus, minus, add]

flag = True
for l in list :
    if flag :
        box = l
        flag = False
    else :
        if l >= box :
            box = l
print(box)

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    A = list(map(int,input().split()))
    B = A[1]
    A = A[0]
    ans = [0] * 3
    ans[0] = A + B
    ans[1] = A - B
    ans[2] = A * B
    print(max(ans))

Submission status: Accepted

Solution code:
import sys
import bisect
input = sys.stdin.readline
 
def main():
    x,y = map(int,input().split())	
    ans=max(x+y,x-y,x*y)
    print(ans)
    
main()

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

print(max(a*b,a-b,a+b))

Submission status: Accepted

Solution code:
num_int = list(map(int, input().split()))
A = num_int[0]
B = num_int[1]

if(A+B > A-B):
    if(A+B > A*B):
        print(A+B)
    else:
        print(A*B)
else:
    if(A-B > A*B):
        print(A-B)
    else:
        print(A*B)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

print(max(a+b, a-b, a*b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = [int(i) for i in input().split()]
l = [a+b,a-b,a*b]
print(max(l))

Submission status: Accepted

Solution code:
def solve(string):
    a, b = map(int, string.split())
    return str(max(a + b, a - b, a * b))


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
a=A+B
b=A-B
c=A*B

kotae=max(a,b,c)


print(kotae)

Submission status: Accepted

Solution code:
A, B = [int(_) for _ in input().split(' ')]

print(max(A - B, A + B, A * B))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
n = a+b
m = a-b
l = a*b

a_b = [n,m,l]
print(max(a_b))

Submission status: Accepted

Solution code:
num = input().split()
a = int(num[0])
b = int(num[1])
calc = [a + b, a - b, a * b]
print(max(calc))

Submission status: Accepted

Solution code:
print( *[ max([x[0]+x[1],x[0]-x[1],x[0]*x[1]]) for x in [[int(i) for i in input().split()]]])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
calcu = [a+b, a-b, a*b]
print(max(calcu))

Submission status: Accepted

Solution code:
import math, heapq
INF = float("inf")
MOD = int(1e9 + 7)

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

print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
array = [0]*3
array[0]=a+b
array[1]=a-b
array[2]=a*b
print(max(array))

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
x = a+b
y = a-b
z = a*b
print(max(x,y,z))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = [int(x) for x in input().split(' ')]
l = [A+B, A-B, A*B]
print(max(l))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(max({a+b,a-b,a*b}))

Submission status: Accepted

Solution code:
import sys
import math
import bisect
import atexit
import io
import heapq
from collections import defaultdict, Counter
MOD = int(1e9+7)



# n = map(int, raw_input().split())
# input = map(int, raw_input().split())
def main():
    a, b = map(int, raw_input().split())
    print max(a+b, a-b, a*b)



main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000)
input=sys.stdin.readline
def intinput():return map(int,input().split())

a,b=intinput()
print(max(a+b,a-b,a*b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()

a = int(a)
b = int(b)

mx = -15555

if mx < a-b:
    mx = a-b

if mx < a*b:
    mx = a*b

if mx < a+b:
    mx = a+b

print(mx)

Submission status: Accepted

Solution code:
a,b = map(int,input().split(' '))
print(max(a+b,max(a-b,a*b)))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(sorted([a + b, a - b, a * b])[2])

Submission status: Accepted

Solution code:
A,B= map(int,input().split())

print(max(A+B,A-B,A*B))

Submission status: Accepted

Solution code:
A, B = [int(n) for n in input().split()]
print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

print(max(a+b,a*b,a-b))

Submission status: Accepted

Solution code:
A , B = map (int , input().split())

plus = A + B 
minus = A - B 
kakeru = A*B 

max = plus

if ( minus > max):
    max = minus

if ( kakeru > max ):
    max = kakeru

print(max)

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]

print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
a, b = map(int, input().split(" "))

print( max([a+b, a-b, a*b]) )

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(max(a + b, a- b, a * b))

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
s=a+b
m=a-b
b=a*b
t=s
if t<m:t=m
if t<b:t=b
print(t)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a, b = map(int, input().split())
print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:

def func(a, b):
    a_plus_b = a + b
    a_minus_b = a - b
    a_times_b = a * b
    print(max(a_plus_b, a_minus_b, a_times_b))

if __name__ ==  '__main__':
    a, b = map(int, input().split())
    func(a, b)

Submission status: Accepted

Solution code:
a, b = input().split()
a, b = int(a), int(b)

answer = max(a + b, a - b, a * b)
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)

a, b = [int(i) for i in input().split()]
print(max(a+b,a-b,int(a*b)))

Submission status: Accepted

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

print(max([A+B, A-B, A*B]))

Submission status: Accepted

Solution code:
import sys
from math import factorial
input = sys.stdin.readline

N, M = map(int, input().split())

print(max(N + M, N - M, N * M))

Submission status: Accepted

Solution code:
import sys

from operator import itemgetter

def main():

	input = sys.stdin.readline
	a,b = [int(item) for item in input().split()]
	print(max(max(a+b,a-b),a*b))

main()

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    print(max(A + B, A - B, A * B))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
inputs = [int(x) for x in input().split()]
a, b = inputs[0], inputs[1]

print(max(max(a+b, a-b), a*b))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(max([A+B,A-B,A*B]))

Submission status: Accepted

Solution code:
import numpy as np
a,b = map(int,input().split())
c = np.max([a-b,a+b,a*b])
print("{}".format(c))

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    print(max(a + b, a - b, a * b))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
# /usr/bin/python3

def main():
  a, b = map(int, input().strip().split(' '))
  print(max([a+b, a-b, a*b]))
  pass

if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
C=A+B
D=A-B
E=A*B
print(max(D,E,C))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
ls=[A+B,A-B,A*B]
print(max(ls))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

lst = []
lst.append(a+b)
lst.append(a-b)
lst.append(a*b)

print(max(lst))

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))

sum = a[0] + a[1]
diff = a[0] - a[1]
seki = a[0] * a[1]

print(max(sum, diff, seki))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
x = a + b
y = a - b
z = a * b

print(max(x,y,z))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
AB = input().split()
A = int(AB[0])
B = int(AB[1])

max = -100

for calc in [A+B, A - B, A * B]:
  if calc > max:
    max = calc
print(max)

Submission status: Accepted

Solution code:
A, B =[int(x) for x in input().split()]
print(max([A+B, A-B, A*B]))

Submission status: Accepted

Solution code:
def main():
    input_line = list(map(int,input().split()))
    max_num = max({input_line[0]+input_line[1],input_line[0]-input_line[1],input_line[0]*input_line[1]})
    print(max_num)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B = map(int, input().split(' '))
print(max([A+B, A-B, A*B]))

Submission status: Accepted

Solution code:
a, b = map(int, input("").split(" "))

x = [a+b, a-b, a*b]
ans = max(x)
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
list1 = []
list1.append(a+b)
list1.append(a-b)
list1.append(a*b)
print(max(list1))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
sum1= a+b
sub = a-b
mul = a*b
print(max(sum1,sub,mul))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
x=a+b
y=a-b
z=a*b

print(max(x,y,z))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

sum = a+b
sub = a-b
mul = a*b
list = [sum, sub, mul]

print(max(list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B =map(int, input().split())
          
n = []

n.append(A+B)
n.append(A-B)
n.append(A*B)
          
print(max(n))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

c = [a + b, a - b, a * b]

c.sort()

print(c[2])

Submission status: Accepted

Solution code:
a, b = map(int, input().split(" "))

print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))

print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print(max(a+b, a*b, a-b))

Submission status: Accepted

Solution code:
values = list(map(int, input().split(' ')))
AplusB = values[0] + values[1]
AminusB = values[0] - values[1]
AtimesB = values[0] * values[1]
print(max([AplusB, AminusB, AtimesB]))

Submission status: Accepted

Solution code:
import numpy as np

a,b = np.array(list(map(int,input().split())))

result = np.array([a+b,a-b,a*b])

print(result.max())

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
print max(a+b, a-b, a*b)

Submission status: Accepted

Solution code:
import time
 
time.sleep(0.5)
a, b = map(int, input().split())
print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
A,B= list(map(int,input().split())) 
C = A + B
if C < (A - B):
  C = A - B
if C < (A * B):
  C = A * B
print(C)

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

Solution code:
A, B = [int(_) for _ in input().split()]

print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = [a + b , a - b, a * b]
print(max(c))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
ans = max(A + B, A - B, A * B)
print(ans)

Submission status: Accepted

Solution code:
a, b  = map(int, input().split())
print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

sumi = a+b
sub = a-b
mul = a*b

print(max(sumi,sub,mul))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c = max(a+b,a-b)
ans =max(a*b,c)
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
A = a + b
B = a - b
C = a * b
List = [A,B,C]
print(max(List))

Submission status: Accepted

Solution code:
tmp = input().split()
a = int(tmp[0])
b = int(tmp[1])

n1 = a + b
n2 = a-b
n3 = a*b
if n1 > n2 and n1 > n3:
  print(n1)
elif n2 > n3:
  print(n2)
else:
  print(n3)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
a=[]
a.append(int(A+B))
a.append(int(A*B))
a.append(int(A-B))
print(max(a))

Submission status: Accepted

Solution code:
the_string = input()
a, b = the_string.split()
a = int(a)
b = int(b)
ans = max(a-b, a+b, a*b)
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

# solve & output
print(max(A + B, A - B, A * B))

Submission status: Accepted

Solution code:
import os,re,sys,operator
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations,groupby
from sys import stdin,setrecursionlimit
from copy import deepcopy
import heapq

setrecursionlimit(10**6)
a,b=map(int,input().split())
print(max(a*b,a+b,a-b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

add = a + b
minus = a - b
product = a * b

list = []
list.append(add)
list.append(minus)
list.append(product)
list.sort()
print(list[-1])

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from sys import stdin
import math

# 標準入力をスペースで区切って、intに変換 listに収納
int_list  = [int(x) for x in stdin.readline().rstrip().split()]

A = int_list[0]
B = int_list[1]

print(max(A+B,A-B,A*B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())

ans = a+b
ans2 = a*b
ans3 = a-b
if ans < ans2:
    ans = ans2

if ans < ans3:
    ans = ans3
    
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
x = a+b
y = a-b
z = a*b

if x <= z and y<= z:
    print(z)
elif z <= x and y <= x:
    print(x)
else:
    print(y)

Submission status: Accepted

Solution code:
"""
 // Author : snape_here - Susanta Mukherjee

"""
from __future__ import division, print_function
import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
else:
    _str = str
    str = lambda x=b"": x if type(x) is bytes else _str(x).encode()

    
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
from math import ceil,floor,log,sqrt,factorial,pow,pi
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *,threading


# For getting input from input.txt file 
#sys.stdin = open('input.txt', 'r')  
  
# Printing the Output to output.txt file 
#sys.stdout = open('output.txt', 'w') 

def ii(): return int(input())
def fi(): return float(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())

def main():
    
    a,b=mi()
    print(max(a+b,a-b,a*b))
        
# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        if self.buffer.tell():
            return self.buffer.read()
        return os.read(self._fd, os.fstat(self._fd).st_size)

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", b" "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", b"\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip(b"\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import glob
import numpy as np


# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\137\\A'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class A(Common):

    def resolve(self):

        tmp = [int(i) for i in self.input_data().split()]
        A = tmp[0]
        B = tmp[1]

        result = A + B
        if A - B > result:
            result = A -B
        if A * B > result:
            result = A * B

        print(str(result))


solver = A(REL_PATH)
solver.exec_resolve()

Submission status: Accepted

Solution code:
temp=list(map(int, input().split()))

print(max([temp[0]+temp[1], temp[0]-temp[1], temp[0]*temp[1]]))

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))

m = max(i[0]+i[1], i[0]*i[1], i[0]-i[1])

print(m)

Submission status: Accepted

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
"""
#decomment when needed
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
"""
a,b  = ips()

print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
ab = input().split(' ')
a = int(ab[0])
b = int(ab[1])

print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
lst = [a+b, a-b, a*b]
print(max(lst))

Submission status: Accepted

Solution code:
def add(A, B):
    return (A + B)

def sub(A, B):
    return (A - B)

def mult(A, B):
    return (A * B)


def main():
    inp = input('')
    inp = inp.split()
    A = int(inp[0])
    B = int(inp[1])

    C = []
    C.append(add(A,B))
    C.append(sub(A,B))
    C.append(mult(A,B))

    ans = max(C)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(max(max(a+b, a-b), a*b))

Submission status: Accepted

Solution code:
import sys

A,B = map(int,sys.stdin.readline().split())
maxNum= A+B
maxNum= max(maxNum,A-B)
maxNum= max(maxNum,A*B)
print(maxNum)

Submission status: Accepted

Solution code:
a,b=[int(x) for x in input().split(' ')]
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
x = max(A[0] + A[1], A[0] - A[1], A[0] * A[1])
print(x)

Submission status: Accepted

Solution code:
a , b = map(int , input().split())
 
def fun(a,b):
    adds = a+b
    subs = a-b
    muls = a*b
 
    if adds > subs:
        if adds > muls:
            return adds
        else:
            return muls
    else:
        if subs > muls:
            return subs
        else:
            return muls
 
#a,b = -13,3
 
print(fun(a,b))

Submission status: Accepted

Solution code:
AB = input().split()

ABsum = int(AB[0]) + int(AB[1])
ABdif = int(AB[0]) - int(AB[1])
ABmul = int(AB[0]) * int(AB[1])

list = [ABsum, ABdif, ABmul]
print(max(list))

Submission status: Accepted

Solution code:
a,b =  map(int,input().split())
print(max(a+b, a-b, a*b))

Submission status: Accepted

Solution code:
A, B = list(map(int, (input().split(' '))))

print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))

j = [i[0] + i[1], i[0] - i[1], i[0] * i[1]]

j.sort(reverse=True)

print(j[0])

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())  
s = a + b
m = a - b
c = a * b
list = [s,m,c]
list.sort(reverse=True)
print(list[0])

Submission status: Accepted

Solution code:
#!/usr/local/bin/python3.7
A, B = map(int, input().split())
plus = A + B
m = A - B
malti = A * B

print(max(plus, m, malti))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(max(a + b, a -b, a * b))

Submission status: Accepted

Solution code:
A, B = map(int, input().split(' '))

add = A + B
sub = A - B
mul = A * B

print(max([add, sub, mul]))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(max([A*B, A-B, A+B]))

Submission status: Accepted

Solution code:
input_A, input_B = [int(x) for x in input().split()]
print(max([input_A+input_B, input_A-input_B, input_A*input_B]))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
x = max(a*b, a+b, a-b)
print(x)

Submission status: Accepted

Solution code:
def run_a():
    a, b = map(int, input().split())

    print(max([a+b, a-b, a*b]))

if __name__ == "__main__":
    run_a()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

print(max([a+b,a-b,a*b]))

Submission status: Accepted

Solution code:
A,B=[int(e) for e in input().split(' ')]
print(max([A+B,A-B,A*B]))

Submission status: Accepted

Solution code:
a,b = map(int, input().split(' '))

ma = -1000
a1 = [a + b,a - b,a * b]
for i in a1:
  if ma < i:
    ma = i
print(ma)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    ans = []
    ans.append(A+B)
    ans.append(A-B)
    ans.append(A*B)
    print(max(ans))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


A, B = map(int, input().split())
Add = A + B
Sub = A - B
Mul = A * B
print( max([Add,Sub,Mul]) )

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = max(a-b, a+b , a*b)
print(ans)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print(max([A*B,A+B,A-B]))

Submission status: Accepted

Solution code:
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
l = [a+b, a-b, a*b]
print(max(l))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
a = [A+B, A-B, A*B]
a.sort()
print(a[2])

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A + B >= A - B and A + B >= A * B:
	print(A + B)
elif A - B >= A * B:
	print(A - B)
else:
	print(A * B)