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:
def iread():
    return int(input())


def sread():
    return input()


def aread(t="int"):
    if t == "int":
        ret = [int(i) for i in input().split()]
    elif t == "str":
        ret = list(input())
    else:
        ret = tmp
    return ret


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


def main():
    a,b = scan()
    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
m = a - b
x = a * b
print(max(plus,m,x))

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:
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().rstrip().split())

cand = a + b
if a - b > cand:
  cand = a - b

if a * b > cand:
  cand = a * b
  
print(cand)

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().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())
r1=a+b
r2=a-b
r3=a*b
print(max(r1,r2,r3))

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:
#ABC137A
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())

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

Submission status: Accepted

Solution code:
inp = [int(x) for x in input().split()]

a = inp[0]
b = inp[1]

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


print(max(compare_arr))

Submission status: Accepted

Solution code:
n=input()
print(max([eval(n.replace(' ',c)) for c in '+-*']))

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

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

Submission status: Accepted

Solution code:
a = []
a = input().split()

A = int(a[0])

B = int(a[1])

plu = A + B

dif = A - B

mul = A * B

max = plu

if dif > max :
	max = dif
if mul > max :
	max = mul

print(max)

Submission status: Accepted

Solution code:
from sys import stdin

A, B = [int(x) for x 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()))
print(max(a+b, a-b,a*b))

Submission status: Accepted

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

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:
x=input().split()

for i in range(2):
    x[i]=int(x[i])

y=[0]*3
y[0]=x[0]+x[1]
y[1]=x[0]-x[1]
y[2]=x[0]*x[1]
 
print(max(y))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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())
alist = []
alist.append(A*B)
alist.append(A+B)
alist.append(A-B)
alist.sort()
print(alist[2])

Submission status: Accepted

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

Submission status: Accepted

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

A = inputNum[0]
B = inputNum[1]

plusAnswer = A + B
minusAnswer = A - B
multiAnswer = A * B

maxAnswer = plusAnswer
if (maxAnswer < minusAnswer):
    maxAnswer = minusAnswer
if (maxAnswer < multiAnswer):
    maxAnswer = multiAnswer

print(maxAnswer)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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= (int(i) for i in input().split()) 
c = a + b
d = a-b
e = a*b

print(max([c,d,e]))

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
gi = lambda : list(map(int,input().split()))
a, b = gi()
print(max(a + b, a - b, a * b))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC137A - +-x
def main():
    A, B = tuple(map(int, input().rstrip().split()))
    ans = max(A + B, A - B, A * B)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin

readline = stdin.readline


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


if __name__ == "__main__":
    main()

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

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=[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, 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:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
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())
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 subprocess import*
with open('A.py','w')as f:
    f.write('a,b=map(int,input().split())\n')
    for i in range(-100,101):
        f.write('if a==%d:\n'%i)
        for j in range(-100,101):
            f.write('    if b==%d:print(%d)\n'%(j,max(i+j,i-j,i*j)))
call(('python3','A.py'))

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

Submission status: Accepted

Solution code:
while True:
    try:
        A, B = map(int, input().split())
        print(max(A + B, A - B, A * B))
    except EOFError:
        break

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:
import bisect;import heapq;import itertools;import math;import operator;import os;import re;import string;import sys;from collections import Counter, deque, defaultdict;from copy import deepcopy;from decimal import Decimal;from fractions import gcd;from functools import lru_cache, reduce;from operator import itemgetter, mul, add, xor;import numpy as np;sys.setrecursionlimit(2147483647);INF = float("inf");IINF = 10 ** 18;MOD = 10 ** 9 + 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())
pls=(a)+(b)
mns=(a)-(b)
kak=(a)*(b)
if kak>=pls and kak>=mns:
    print(kak)
elif pls>=mns and pls>=kak:
    print(pls)
elif mns>=pls and mns>=kak:
    print(mns)

Submission status: Accepted

Solution code:
sp = " ";rt = "\n";MOD = 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())
print(max(a+b, a-b, a*b))

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

P = A + B
M = A - B
T = A * B

print(max(P, M, T))

Submission status: Accepted

Solution code:
import sys

#sys.stdin = open("first.txt","r")

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

raw_input = sys.stdin.readline

if __name__ == '__main__':
	#for j in xrange(int(raw_input())):
	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=list(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:
a, b = [int(x) for x 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:
inpl = lambda: 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())
x = a*b
c = a +b
d = a - b
print(max([x,c,d]))

Submission status: Accepted

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

max_num = a + b
for i in [a*b, a-b]:
    if i > max_num:
        max_num = i
print(max_num)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans1 = a + b
ans2 = a - b
ans3 = a * b
if ans1 >= ans2 and ans1 >= ans3:
  print(ans1)
  exit()
if ans2 >= ans1 and ans2 >= ans3:
  print(ans2)
  exit()
if ans3 >= ans1 and ans3 >= ans2:
  print(ans3)
  exit()

Submission status: Accepted

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


if __name__ == '__main__':
  main()

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

m = a+b
if a-b > m:
    m = a-b
if a*b > m:
    m = a*b

print(m)

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())
 
t = A + B
x = A * B
m = A - B
 
map = {'t': t, 'x': x, 'm': m}

sorted_map = sorted(map.items(), key=lambda x:x[1])

ans = sorted_map[-1]
print(ans[-1])

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 = (int(i) for i in input().split())

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

print(max(list))

Submission status: Accepted

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

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

Submission status: Accepted

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

sum = A+B
difference = A-B
product = A*B

ans = sum

if ans < difference:
    ans = difference

if ans < product:
    ans = product

print(ans)

Submission status: Accepted

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

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

print('{}'.format(ans))

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 = map(int, input().split())
 
plus = a + b
 
minus = a - b
 
kakeru = a * b

list = [plus, minus, kakeru]

print(max(list))

Submission status: Accepted

Solution code:
import sys
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()
 
A,B = MULT_INT_LIST()
new = []
C = A+B 
D = A-B
E = A*B
new.append(C)
new.append(D)
new.append(E)
print(max(new))

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,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
A,B = map(int,input().split())
ans1 = A+B
ans2 = A*B
ans3 = A-B

print(max(ans1,ans2,ans3))

Submission status: Accepted

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

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

anser = add

if anser < dif:
  anser = dif

if anser < mul:
  anser = mul

print(anser)

Submission status: Accepted

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

n_list = []
c = a + b
d = a - b
e = a * b

n_list.append(c)
n_list.append(d)
n_list.append(e)

print(max(n_list))

Submission status: Accepted

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

print(max)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

d = a+b
e = a-b
f = a*b
print(max(max(d,e),f))

Submission status: Accepted

Solution code:
mi = lambda: map(int, input().split())
add = lambda x, y: x + y
sub = lambda x, y: x - y
mul = lambda x, y: x * y

A, B = mi()
l = [add(A, B), sub(A, B), mul(A, B)]
print(max(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(max(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:
  if y<z:
    print(z)
  else:
    print(y)
else:
  if x>z:
    print(x)
  else:
    print(z)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
# import numpy as np
# import copy

def main():
    a,b = [int(i) for i in input().split(' ')]

    one = a + b
    two = a - b
    three =a * b

    print(max(one ,two ,three))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
input_list = input().split()
A = int(input_list[0])
B = int(input_list[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)
elif (A+B) <= (A-B) and (A+B) <= (A*B):
    if (A-B) >= (A*B):
        print(A-B)
    else:
        print(A*B)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):

    res = A + B
    if res < A - B:
        res = A - B
    if res < A * B:
        res = A * B

    print(res)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

a, b = list(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]+ab[1]
b=ab[0]*ab[1]
c=ab[0]-ab[1]
flag=0
if a>b:
  if a>c:
    print(a)
    flag=1
else:
  if b>c:
    print(b)
    flag=1
if flag==0:
  print(c)

Submission status: Accepted

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

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

print(maxi)

Submission status: Accepted

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

Submission status: Accepted

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

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:
args = input().split()
A = int(args[0])
B = int(args[1])

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, max(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 sys
INPUT = sys.stdin.readline
#入力関数
def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

A,B = MULT_INT_LIST()
new = []
C = A+B 
D = A-B
E = A*B
new.append(C)
new.append(D)
new.append(E)
print(max(new))

Submission status: Accepted

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

nAns = A+B
nTmp = A-B

if nTmp > nAns:
  nAns = nTmp

nTmp = A*B

if nTmp > nAns:
  nAns = nTmp

print(nAns)

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    A, P = map(int, input().split())
    s = A + P
    d = A - P
    f = A * P
    num_list = [s, d, f]
    
    return max(num_list)

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

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=[int(a) for a in str(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
times = A*B
print(max(plus, minus, times))

Submission status: Accepted

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

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

a=int[0]
b=int[1]

x=a+b
y=a-b
z=a*b

max=x
if y > max:
    max=y
if z > max:
    max=z
print(max)

Submission status: Accepted

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

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

Submission status: Accepted

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

max = -100

if A*B > max:
  max = A*B
if A+B > max:
  max = A+B
if A-B > max:
  max = A-B
  
print(max)

Submission status: Accepted

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

A = S[0]
B = S[1]

list = []

C = A-B
list.append(C)
D = A+B 
list.append(D)
E = A*B
list.append(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())
ans= []
ans.append(a+b)
ans.append(a-b)
ans.append(a*b)

print(max(ans))

Submission status: Accepted

Solution code:
A,B=[int(item) for item 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:
str = input()
numbers = str.split(" ")

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

sum = a + b
diff = a - b
kake = a * b

print(max([sum, diff, kake]))

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:
def A_pluminus():
    A, B = map(int, input().split())
    plus = A + B
    minus = A - B
    kakeru = A * B
    list_a  = [plus, minus, kakeru]
    print(max(list_a))
    
if __name__ == "__main__":
    A_pluminus()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main(input())

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations
import sys
import bisect
import string
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
YNeos='YNeos'
mo=10**9+7
imp='IMPOSSIBLE'

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

Submission status: Accepted

Solution code:
#整数の入力

# A = int(input())
# B = int(input())

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

# 和、差、積を順に求めて最大値を出力する

if (A + B) > (A - B):
	MAX = (A + B)
else:
	MAX = (A - B)

if MAX > (A * B):
	print(MAX)
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:
import numpy as np

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

ans = np.zeros(3)
ans[0] = A + B
ans[1] = A - B
ans[2] = A * B

print(int(np.max(ans)))

Submission status: Accepted

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

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:
import sys

for line in sys.stdin:
  [a,b] = map(lambda x:int(x),line.split(' '))
  print(sorted([a+b,a-b,a*b])[2])

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

# import bisect
# import math
# import numpy as np
# from fractions import gcd

"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    # output.append(a[j])
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    a, b = ip.IL()
    memo = max(a+b, a-b)
    print(max(memo, a*b))


main()

Submission status: Accepted

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

Submission status: Accepted

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

x = a + b;
y = a - b;
z = a * b;

arr = [x, y, z]
result = sorted(arr)
print(result[2])

Submission status: Accepted

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