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:
"""
author : halo2halo
date : 11, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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


plus = 0
mainus = 0
cross = 0

plus = inputA + inputB
mainus = inputA -inputB
cross = inputA * inputB

if plus > mainus:
    if plus > cross:
        print(plus)
    else:
        print(cross)
elif mainus > cross:
    print(mainus)
else:
    print(cross)

Submission status: Accepted

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

Sum = A + B
Sub = A - B
Mult = A * B

print(max(Sum,Sub,Mult))

Submission status: Accepted

Solution code:
num = input().split()
wa = int(num[0]) + int(num[1])
sa = int(num[0]) - int(num[1])
seki =  int(num[0]) * int(num[1])
if wa >= sa:
  if wa >= seki:
    print(wa)
  else:
    print(seki)
else:
  if sa >= seki:
    print(sa)
  else:
    print(seki)

Submission status: Accepted

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

cResult =[]

cResult.append(a*b)
cResult.append(a+b)
cResult.append(a-b)

cSorted = sorted(cResult,reverse=True)

print(cSorted[0])

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
l = sorted([A+B,A-B,A*B])
print(l[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 = map(int, input().split())

a = A + B
b = A - B
c = A * B
d = max(a, b, c)

print(d)

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

s = (A + B)
t = (A - B)
u = (A * B)

print(max(s, t, u))

Submission status: Accepted

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

if A == 0 and B == 0:
    print('0')

elif A == 1 and B >= 0:
    print(A + B)

elif A >= 0 and B == 1:
    print(A + B)

elif A > 0 and B > 0:
    print(A * B)

elif A < 0 and B < 0:
    print(A * B)

elif A <= 0 and B >= 0:
    print(A + B)

else:  # A >= 0 and B <= 0:
    print(A - B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = (int(x) for x in input().split())
ans1 = a+b
ans2 = a-b
ans3 = a*b

if ans1 > ans2:
    if ans1 > ans3:
        print(ans1)
    else:
        print(ans3)

else:
    if ans2 > ans3:
        print(ans2)
    else:
        print(ans3)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input()
n_list = n.split(" ")

a = int(n_list[0])
b = int(n_list[1])

p = a + b
mi = a - b
mu = a * b

if p >= mi and p >= mu:
    print(p)
elif mi >= p and mi >= mu:
    print(mi)
elif mu >= p and mu >=mi:
    print(mu)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a,b = LI()

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


print(main())

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    print(max(a+b,a-b,a*b))
if __name__ == '__main__':
    do()

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

a = A+B
b = A-B
c = A*B

if a >= b and a >= c:
    print(a)
elif b >= a and b >= c:
    print(b)
elif c >= a and c >= b:
    print(c)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    print(main())

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

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 = list(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

if x > y:
  if x>z:
    ans = x
  else:
    ans = z
else:
  if y>z:
    ans = y
  else:
    ans = z

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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()))
box = []
box.append(a+b)
box.append(a-b)
box.append(a*b)
print(max(box))

Submission status: Accepted

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

A = a + b
B = a - b
C = a * b

print(max([A, B, C]))

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

Submission status: Accepted

Solution code:
from sys import stdin
 
a,b = [int(x) for x in stdin.readline().rstrip().split()]
 
arr =[]
 
arr.append(a+b)
arr.append(a-b)
arr.append(a*b)
 
print(max(arr))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# スペース区切りの整数の入力
b, c = map(int, input().split())

p = b + c
m = b - c
k = b * c

if p > m:
    if p > k:
        print(p)
    else:
        print(k)
elif k > m:
    print(k)
else:
    print(m)

Submission status: Accepted

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

wa = a+b
sa = a-b
seki = a*b


print(max(wa,sa,seki))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=(int(x) for x in input().split())
t=a+b
k=a*b
h=a-b
ans=max(t,k,h)
print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    a,b=map(int,input().split())
    print(max(a+b,a-b,a*b))
resolve()

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,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:
nums=[int(i) for i in input().split()]

p=nums[0]+nums[1]
m=nums[0]-nums[1]
x=nums[0]*nums[1]

print(max(p,m,x))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
c = A + B
d = A - B
e = A * B
f = [c, d, e]
maxvalue = c
for i in range(len(f)):
    if f[i] > maxvalue:
        maxvalue = f[i]
print(maxvalue)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- 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() )
print( max( A + B, A - B, A * B ) )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
import sys

num = list(map(int,input().split()))
A = num[0]
B = num[1]

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

Submission status: Accepted

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

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
d = a-b
e = a*b

if c >= d and c >= e:
  print(c)
elif d >= e and d >= c:
  print(d)
else:
  print(e)

Submission status: Accepted

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

Submission status: Accepted

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

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)

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

print(max(l))

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

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

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

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:
ab = list(map(int, input().split()))
a = ab[0]
b = ab[1]

ans1 = a + b
ans2 = a - b
ans3 = a * b

print(max(ans1, ans2, ans3))

Submission status: Accepted

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

add = A + B
sub = A - B
times = A * B
calc_result = [add, sub, times]

print(max(calc_result))

Submission status: Accepted

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

ls = []
ls.append(a+b)
ls.append(a-b)
ls.append(a*b)
print(max(ls))

Submission status: Accepted

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

Submission status: Accepted

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

plus = a + b
mnus = a - b
kakeru = a * b

ans = max(plus, mnus, kakeru)
print(ans)

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b = list(map(int,input().split()))
ans = int(max(a+b,a-b,a*b))
print(ans)

Submission status: Accepted

Solution code:
list = input().split()
a = int(list[0])
b = int(list[1])
ans = a+b
ans_2 = a-b
ans_3 = a*b
if ans_2>ans:
    ans = ans_2
if ans_3>ans:
    ans = ans_3
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())

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

print(max(L))

Submission status: Accepted

Solution code:
x=input()
x =x.split(" ")
c = [int(str) for str in x]
a=c[0]
b=c[1]
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=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())
x = [a+b,a-b,a*b]
print(max(x))

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())
c=a+b
if a-b>c:
    c=a-b
if a*b>c:
    c=a*b
print(c)

Submission status: Accepted

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

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

print(max(a, s, m))

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

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

Submission status: Accepted

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

Submission status: Accepted

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

li=[A+B,A-B,A*B]

print(max(li))

Submission status: Accepted

Solution code:
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()))
 
if l[0]+l[1]>=l[0]-l[1] and l[0]+l[1]>=l[0]*l[1]:
    print(l[0]+l[1])
elif l[0]-l[1]>=l[0]+l[1] and l[0]-l[1]>=l[0]*l[1]:
    print(l[0]-l[1])
elif l[0]*l[1]>=l[0]-l[1] and l[0]*l[1]>=l[0]+l[1]:
    print(l[0]*l[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

hoge = [A+B,A-B,A*B]

print(max(hoge))

Submission status: Accepted

Solution code:



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

Submission status: Accepted

Solution code:
# abc137 A
ab = list(map(int,input().split()))
a = ab[0]
b = ab[1]

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

print(max(in_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = list(map(int,input().split()))
add = data[0] + data[1]
sub = data[0] - data[1]
mul = data[0] * data[1]
result = [add,sub,mul]
ans = add
if sub > ans:
  ans = sub
if mul > ans:
  ans = mul
print(ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
t=a+b
h=a-b
k=a*b

kekka=[t,h,k]
kekka.sort()

print(kekka[-1])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#ABC-137-A
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())
s = [a+b,a-b,a*b]
print(max(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import datetime

# 入力
#N = int(input())
#S = str(input())
#N, A, B = map(int, input().split())
A, B = map(int, input().split())

list = []
list.append(A+B)
list.append(A-B)
list.append(A*B)
list.sort()

print (list[2])

Submission status: Accepted

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

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

print(result)

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(max(max(a+b, a-b), max(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
ans = max(x,y,z)
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())
a = A+B
b = A-B
c = A*B
List = [a,b,c]
print(max(List))

Submission status: Accepted

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

Submission status: Accepted

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

kigo = ["+","-","*"]
s_L = []
for val in kigo:
    tmp = eval(str(a) + val + str(b))
    s_L.append(tmp)
print(max(s_L))

Submission status: Accepted

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

    if not(isinstance(a, int) and isinstance(b, int)):
        return
    if not(-100 <= a and a <= 100 and -100 <= b and b <= 100):
        return

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

    print(max(num))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    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()]
ans = []
ans.append(A + B)
ans.append(A - B)
ans.append(A * B)
print(max(ans))

Submission status: Accepted

Solution code:
#+-x
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())
num1 = a + b
num2 = a - b
num3 = a * b

if num1 > num2:
    max = num1
else:
    max = num2

if max > num3:
    print(max)
else:
    print(num3)

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

s.append(a+b)
s.append(a-b)
s.append(a*b)
print(max(s))

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

a, b = map(int, raw_input().split())
num1 = a + b
num2 = a - b
num3 = a * b
if num1 < num2:
    num1 = num2
if num1 < num3:
    num1 = num3
print num1

Submission status: Accepted

Solution code:
# coding: utf-8 

a, b = map(int, raw_input().split())
num1 = a + b
num2 = a - b
num3 = a * b
if num1 < num2:
    num1 = num2
if num1 < num3:
    num1 = num3
print num1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=list(map(int, input().split()))
A, B = l[0], l[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 =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)
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:
a,b=map(int,input().split())
add = a+b
sub = a-b
mul = a*b

if(add > sub and add > mul):
  print(add)
elif(sub > add and sub > mul):
  print(sub)
elif(mul > add and mul > sub):
  print(mul)
else:
  print(add)

Submission status: Accepted

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

max = 0
if a + b >= a - b:
    max = a + b
else:
    max = a - b

if max >= a * b:
    pass
else:
    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 = map(int,input().split())
N_lis = []
N_lis.append(A+B)
N_lis.append(A*B)
N_lis.append(A-B)
print(max(N_lis))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
 
C = A+B
D = A-B
E = A*B
 
LIST = [C,D,E]
 
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 = map(int,input().split())
p = a + b
m = a - b
k = a * b
l = [p,m,k]
print(max(l))

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

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:
# 2019-11-16 14:51:41(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    a, b = [int(x) for x in sys.stdin.readline().split()]
    ans = max(a+b, a-b, a*b)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
sum = a+b
dif = a-b
pro = a*b
ans = [sum, dif, pro]
print(max(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, a + b, a * b))

Submission status: Accepted

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

a = ab[0]
b = ab[1]

s = a+b
r = a-b
p = a*b

print(max([s, r, p]))

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

addition = a + b
subtraction = a - b
multiplication = a * b

if addition < subtraction:
  if multiplication < subtraction:
    ans = subtraction
  else:
    ans = multiplication
else:
  if multiplication < addition:
    ans = addition
  else:
    ans = multiplication

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

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

Submission status: Accepted

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


def solve():
    plus = a + b
    minus = a - b
    multi = a * b

    return max(plus, minus, multi)


print(solve())

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 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]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


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


def ceil(a, b):
    return (a + b - 1) // b


# 初項s, 交差dのn個の数列の和
def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(A, B):
    """Test Case
    >>> print_ans(-13, 3)
    -10
    >>> print_ans(1, -33)
    34
    >>> print_ans(13, 3)
    39
    """
    print(max(max(A + B, A - B), A * B))

if __name__ == '__main__':
    A, B = map(int,input().rstrip().split())
    print_ans(A, B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
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())
box = [a*b,a-b,a+b]
print(max(box))

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

tmp = -1000
if a+b > tmp:
    tmp = a+b
if a-b > tmp:
    tmp = a-b
if a*b > tmp:
    tmp = a*b

print(tmp)

Submission status: Accepted

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

l = [0]*3

l[0] = a+b
l[1] = a-b
l[2] = a*b

print(max(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = [int(x) for x in 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:
# import sys
# input = sys.stdin.readline

def main():
    # input
    a, b = map(int, input().split())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# ABC 137: A – +-x
a, b = [int(s) for s 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())
ans=max(a+b,a-b,a*b)
print(ans)