Problem:


Score : 100 points

Problem Statement

You are given two integers A and B.
Find the largest value among A+B, A-B and A \times B.

Constraints

-1000 \leq A,B \leq 1000

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

3 1

Sample Output 1

4

3+1=4, 3-1=2 and 3 \times 1=3. The largest among them is 4.

Sample Input 2

4 -2

Sample Output 2

6

The largest is 4 - (-2) = 6.

Sample Input 3

0 0

Sample Output 3

0



Sample input:
3 1


Sample output:
4

Submission status: Accepted

Solution code:
#encoding 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())

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

l.sort()

print(l[2])

Submission status: Accepted

Solution code:
from sys import stdin

A, B = [int(a) for a in stdin.readline().rstrip().split()]

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

Submission status: Accepted

Solution code:
from sys import stdin

A, B = [int(a) for a in stdin.readline().rstrip().split()]

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:
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())
L = [A+B,A-B,A*B]
L.sort()
print(L[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


def inpl(): return list(map(int, input().split()))


a, b = inpl()
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())
Add=A+B
Sub=A-B
Mul=A*B
if B>=0:
	if Add>=Mul:
		print(Add)
	else:
		print(Mul)
else:
	if Sub>=Mul:
		print(Sub)
	else:
		print(Mul)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = a + b
if a - b > ans:
    ans = a - b

if a * b > ans:
    ans = a * b

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

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

Submission status: Accepted

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

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:
A, B = map(int, input().split())

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

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())

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:
A, B = map(int, input().split())

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

Submission status: Accepted

Solution code:
# 98a
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())
l = [A+B,A-B,A*B]
print(max(l))

Submission status: Accepted

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

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())
ans={A+B, A-B, A*B}
print(max(ans))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
P=A+B
M=A-B
T=A*B
O=0
if(P>M):
  O=P
  if(P>T):
    O=P
  else:
    O=T
else:
  O=M
  if(M>T):
    O=M
  else:
    O=T
print(O)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split(" ")))
c = [0,0,0]
for i in range(3):
    if 0 == i:
        c[i] = A + B
    elif 1 == i:
        c[i] = A - B
    elif 2 == i:
        c[i] = A * B
print(max(c))

Submission status: Accepted

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

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())
print(max(a+b,a-b,a*b))

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:
#!/usr/bin/env python3
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())
list=[a+b,a-b,a*b]
c=max(list)
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:
x = list(map(int, input().split()))
#SumDif = abs(x[0]) + abs(x[1])
Sum = x[0] + x[1]
Dif = x[0] - x[1]
Mul = x[0] * x[1]
print(max(Mul,Sum,Dif))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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:
A,B = map(int,input().split())
print(max(A+B, A-B, A*B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
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())
if a+b > a-b and a+b > a*b:
    print(a+b)
elif a-b > a+b and a-b > a*b:
    print(a-b)
elif a*b > a+b and a*b > a-b:
    print(a*b)
else:
    print(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:
#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())

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

res = -10000
if a - b > res:
    res = a - b 
if a + b > res:
    res = a + b 
if a * b > res:
    res = a * b 
print(res)

Submission status: Accepted

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

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

print(max(c))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y=input().split();print(max(eval(x+c+y)for c in"*+-"))

Submission status: Accepted

Solution code:
print((lambda x:max(eval(x[0]+c+x[1])for c in"*+-"))(input().split()))

Submission status: Accepted

Solution code:
number = input()
lis = number.split()


for num in range(len(lis)-1):
    add = int(lis[num]) + int(lis[num+1])
    pull = int(lis[num]) - int(lis[num+1])
    product = int(lis[num]) * int(lis[num+1])


mostbig = max([add,pull,product])
print(mostbig)

Submission status: Accepted

Solution code:
a=input()
b=a.split()
c=[int(i) for i in b]
t=c[0]+c[1]
h=c[0]-c[1]
k=c[0]*c[1]
ans=max([t,h,k])
print(ans)

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=list(map(int,input().split()))
print(max(max(a+b,a-b),a*b))

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    A, B = list(map(int, input().split()))
    cul_list = []
    cul_list.append(A + B)
    cul_list.append(A - B)
    cul_list.append(A * B)

    print(max(cul_list))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

# Debug output
def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

# Binary converter
def to_bin(x):
    return bin(x)[2:]

# --------------------------------------------

dp = None

def main():
    a, b = [int(_) for _ in input().split()]
    print(max(a+b, a-b, a*b))

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(ans))

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

a = [x+y,x-y,x*y]

print(max(a))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = list(map(int,input().split()))
a = data[0]
b = data[1]
import numpy as np
c = np.array([a +b,a - b, a*b])
print(max(c))

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:
# -*- coding: utf-8 -*-

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(sorted([A + B, A - B, A * B])[2])

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:
print((lambda x: max(x[0]+x[1],x[0]-x[1],x[0]*x[1]))(list(map(int, input().split()))))

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()]

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,max(a-b, a*b)))

Submission status: Accepted

Solution code:
(a,b)=input().split()
a=int(a)
b=int(b)
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:
N=input().split()
A=int(N[0])
B=int(N[1])
Ans=A+B
if(Ans<A-B):
  Ans=A-B
  
if(Ans<A*B):
  Ans=A*B
  
print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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: Add Sub Mul
a,b = map(int, input().split())
if a + b >= a - b and a + b >= a * b:
    print(a + b)
elif a - b >= a + b and a - b >= a * b:
    print(a - b)
elif a * b >= a + b and a * b >= a - b:
    print(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:
A,B = map(int,input().split())

Q = A+B
W = A-B
E = A*B

print(max(Q,W,E))

Submission status: Accepted

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

Submission status: Accepted

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

rtn = A + B 
minus = A - B 
if rtn < minus:
    rtn = minus
multiply = A * B 
if rtn < multiply:
    rtn = multiply
print(rtn)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input().split()
for i in range(2):
    if i == 0:
        A = int(N[i])
    elif i == 1:
        B = int(N[i])

X_1 = A + B
X_2 = A - B
X_3 = A * B

max = X_1

if max < X_2:
    max = X_2
if max < X_3:
    max = X_3

print(max)

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())
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())
C=A+B
D=A-B
E=A*B
ans=max(C,D)
ans=max(ans,E)
print(ans)

Submission status: Accepted

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

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:
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())
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())
M = max(A+B,A-B,A*B)
print(M)

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 - Add Sub Mul

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    A, B = map(int, input().split())
    add = A + B
    sub = A - B
    mul = A * B
    print(max(add, sub, mul))


if __name__ == '__main__':
    main(sys.argv[1:])

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:
a, b = map(int, input().split())
lis = [a+b, a-b, a*b]
print(max(lis))

Submission status: Accepted

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

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:
x, y = [int(s) for s in input().split()]
print(max([x + y, x - y, x * y]))

Submission status: Accepted

Solution code:
A, B = input().split(' ')
A = int(A)
B = int(B)
sum = A + B
dif = A - B
mul = A * B
max = sum
if max < dif:
    max = dif
if max < mul:
    max = mul
print(max)

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().rstrip().split(" "))
print(max(a+b, a-b, a*b))

Submission status: Accepted

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

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:
listA=list(map(int,input().split()))
A=listA[0]
B=listA[1]
listB=[A*B,A+B,A-B]
print(max(listB))

Submission status: Accepted

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

s = A + B
d = A - B
m = A * B

print(max(s, d, m))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, 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())
list=[a+b,a-b,a*b]
print(max(list))

Submission status: Accepted

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

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

print ans

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
ans = [li[0]+li[1],li[0]-li[1],li[0]*li[1]]
ans.sort()
print(ans[2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ANSHUL GAUTAM
# IIIT-D

a,b = map(int, input().split())
summ = a+b
diff = a-b
prod = a*b

maxx = max(summ,diff,prod)
print(maxx)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

result = []

result.append( A + B )
result.append( A - B )
result.append(  A * B)


print(max(result))

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())
ans = max(A+B, A-B, A*B)
print(ans)

Submission status: Accepted

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

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:
a, b = (int(i) for i in input().split())
plus = a+b
min = a-b
mul = a*b
l = [plus,min,mul]
print(max(l))

Submission status: Accepted

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

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:
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:
h, y = map(int, input().split())
ans  = max(h + y, h - y, h * y)
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())

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

Submission status: Accepted

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

max = plus

if minus > max:
	max = minus

if cross > max:
	max = cross

print(max)

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:
A,B = (int(i) for i in input().split())
print(max(A+B,A-B,A*B))

Submission status: Accepted

Solution code:
def add_sub_mul(A, B):
    add = A + B
    sub = A - B
    mul = A * B
    return max(add, sub, mul)

def main():
    A, B = [int(i) for i in input().split()]
    print(add_sub_mul(A, B))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = map(int, raw_input().split())
a = l[0]
b = l[1]

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:
A,B = map(int,input().split())

print('{}'.format(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:
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())
C=A+B
D=A-B
E=A*B
print(max(C,D,E))

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 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:
s = list(map(int,input().split( )))
x = []
x.append(s[0]+s[1])
x.append(s[0]-s[1])
x.append(s[0]*s[1])
ans = max(x)
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ans = a+b
if a-b > ans:
	ans = a-b
if a*b > ans:
	ans = 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())
x = a + b
y = a - b
z = a * b

print(max(x,y,z))

Submission status: Accepted

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

num = raw_input().split()

num[0] = int(num[0])
num[1] = int(num[1])

if num[0]+num[1] > num[0]-num[1]:
    if num[0]+num[1] > num[0]*num[1]:
        print num[0]+num[1]
    else:
        print num[0] * num[1]
else :
        if num[0]-num[1] > num[0]*num[1]:
            print num[0]-num[1]
        else:
            print num[0] * num[1]

Submission status: Accepted

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

h=int(data[0])
i=int(data[1])

c=h+i
if h-i>c: c=h-i
if h*i>c: c=h*i

print (c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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()]
 
X = A + B
Y = A - B
Z = A * B
 
if X >= Y and X >= Z:
    print(X)
elif Y >= X and Y >= Z:
    print(Y)
else:
    print(Z)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

AB = [int (i) for i in input().split()]
A, B = AB[0], AB[1]

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

Submission status: Accepted

Solution code:
# https://beta.atcoder.jp/contests/abc098/tasks/abc098_a

n = list(map(int, input().split()))
a = n[0]
b = n[1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
a=l[0]
b=l[1]

print (max(a-b,a+b,a*b)) # Aの値が出力される

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
a=l[0]
b=l[1]

print (max(a-b,a+b,a*b)) # Aの値が出力される

Submission status: Accepted

Solution code:
# coding: utf-8;

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:
a, b = (int(i) for i in input().split())
max_ab = max(a+b,a-b,a*b)
print(max_ab)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = 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())

max = A + B
if max < A - B:
    max = A - B

if max < A * B:
    max = A * B

print(max)

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(num) for num in input().split()]
maxn = max(A+B,A-B)
maxn = max(maxn,A*B)
print(maxn)

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())


def calcMaxAddSubMul(A, B):
    return max([A+B, A-B, A*B])


print(calcMaxAddSubMul(A, B))

Submission status: Accepted

Solution code:
import sys
A = sys.stdin.readline()
a = A.rstrip()
s = a.split(' ')
s1 = int(s[0]) + int(s[1])
s2 = int(s[0]) - int(s[1])
s3 = int(s[0]) * int(s[1])

print(max(s1,s2,s3))

Submission status: Accepted

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

n_sum = n[0] + n[1]
n_sub = n[0] - n[1]
n_mul = n[0] * n[1]

ans = max(n_sum,n_sub,n_mul)
print(ans)

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 = tuple(map(lambda x: int(x), input().split()))
print(max(a + b, a - b, a * b))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    inputs = list(map(int, input().split()))
    numbers = []
    numbers.append(inputs[0] + inputs[1])
    numbers.append(inputs[0] - inputs[1])
    numbers.append(inputs[0] * inputs[1])
    print(max(numbers))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# output
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:
from sys import stdin

A, B = stdin.readline().rstrip().split()
a = int(A)
b = int(B)

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=list(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())
c = [a+b, a-b, a*b]
print(max(c))

Submission status: Accepted

Solution code:
X = list(int(i) for i in input().split())

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

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())
c=a+b
d=a-b
e=a*b
print(max([c,d,e]))

Submission status: Accepted

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

C = A+B
D = A-B
E = A*B

print (max([C,D,E]))

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:
#abc098a

a,b=map(int,raw_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
multi = a * b
print(max(plus, minus, multi))

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())
sum=a+b
sub=a-b
mul=a*b
if (sum>sub):
    if (sum>mul):
        print(sum)
    else:
       print(mul)
else: 
    if (sub>mul):
        print(sub)
    else:
        print(mul)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    a, b = map(int, input().split())
    ans = max(a+b, max(a-b, a*b))
    print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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