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

import re
from collections import deque
from functools import reduce
from itertools import permutations
from math import pi
from operator import itemgetter
from operator import mul
from operator import xor
from os import linesep
from queue import PriorityQueue
from sys import stdin


def rline() -> str:
    return stdin.readline().strip()


def rlines(hint: int = 1):
    ret = ['' for i in range(hint)]
    for i in range(hint):
        ret[i] = rline()
    return ret


def htokens(hint: int = 1):
    lns = rlines(hint)
    ret = list(map(lambda ln: ln.split(), lns))
    # if return value has one and only one element(list),
    if hint == 1:
        # then add an empty list.
        ret.append([])
    return ret


def vtokens(hint: int = 1):
    m, _ = htokens()
    wint = len(m)
    ret = [[None] * hint for i in range(wint)]
    for y in range(hint):
        if y != 0:
            m, _ = htokens()
        # convert horizontal to vertical
        x = 0
        for v in m:
            ret[x][y] = v
            x += 1
    # if return value has one and only one element(list),
    if wint == 1:
        # then add an empty list.
        ret.append([])
    return ret


def rint(radix: int = 10) -> int:
    return int(rline(), radix)


def hints(hint: int = 1, radix: int = 10):
    ret = htokens(hint)
    for i in range(len(ret)):
        ret[i] = list(map(lambda v: int(v, radix), ret[i]))
    return ret


def vints(hint: int = 1, radix: int = 10):
    ret = vtokens(hint)
    for i in range(len(ret)):
        ret[i] = list(map(lambda v: int(v, radix), ret[i]))
    return ret


def mat(hint: int, wint: int):
    return [[None]*wint for i in range(hint)]


def filllist(lst, value: int) -> None:
    # destructive.
    for i in range(len(lst)):
        lst[i] = value


def isprime(n: int) -> bool:
    if n <= 1:
        return False
    if n in (2, 3, 5):
        return True
    if n % 2 == 0:
        return False
    if n % 3 == 0:
        return False
    lst = int(n**0.5)
    f = 5
    while f <= lst:
        if n % f == 0:
            return False
        if n % (f + 2) == 0:
            return False
        f += 6
    return True


def strmat(matrix, lnsep: str = linesep, fieldsep: str = ' ') -> str:
    return lnsep.join(map(lambda row: fieldsep.join(map(str, row)), matrix))


def strbool(boolval: int) -> str:
    return ['No', 'Yes'][boolval]


def solve() -> None:
    # read here
    (a, b), _ = hints()

    # solve here
    ans = max([a+b, a-b, a*b])

    # print here
    print(ans)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
p = a+b
m = a-b
k = a*b
l =[p,m,k]
l.sort(reverse=True)
print(l[0])

Submission status: Accepted

Solution code:
inp = input().split(" ")
map(int, inp)
inp[0] = int(inp[0])
inp[1] = int(inp[1])
p = inp[0] + inp[1]
m = inp[0] - inp[1]
x = inp[0] * inp[1]
pmx = []
pmx.append(p)
pmx.append(m)
pmx.append(x)
print(max(pmx))

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

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [int(ii) for ii in 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:
# coding: utf-8
# Your code here!

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

A = input[0]
B = input[1]

ans1 = A + B
ans2 = A - B
ans3 = A * B

print(max([ans1, ans2, ans3]))

Submission status: Accepted

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

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

print(max(num_list))

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

Submission status: Accepted

Solution code:
def acinput():
    return list(map(int, input().split(" ")))

import numpy as np

a,b=acinput()


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

Submission status: Accepted

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

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

ans = [ans1, ans2, ans3]

ans.sort(reverse=True)

print(ans[0])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a, b = map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()

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

Submission status: Accepted

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

m = a - b
p = a + b
f = a * b

print(max(m, max(p, f)))

Submission status: Accepted

Solution code:
a,b = [int(s) for s in input().split(" ")]
a_plus_b = a+b
a_minus_b = a-b
a_mul_b = a*b

max_three = max(a_plus_b, max(a_minus_b, a_mul_b))
print(max_three)

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2**31-1)
input = sys.stdin.readline
write = sys.stdout.write
LMIIS = lambda : list(map(int,input().split()))
II = lambda : int(input())
dbg = lambda *something : print(*something) if DEBUG is True else 0
DEBUG = True

def main():
    A,B = LMIIS()
    print(max(A+B,A-B,A*B))





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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

A, B = list(map(int, input().split()))
print('{}'.format(max([A+B, A-B, A*B])))

Submission status: Accepted

Solution code:
def main():
    l = input().split()
    a, b = int(l[0]), int(l[1])
    x = a + b
    y = a - b
    z = a * b
    print(max(x, y, z))
    
if __name__=="__main__":
    main()

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

plus = A + B
hiku = A - B
div = A * B

maxx = max(plus, max(hiku, div))
print(maxx)

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

abp = a+b
abm = a-b
abs = a*b

if abp >= abm and abp >= abs:
  print(abp)
elif abm >= abp and abm >= abs:
  print(abm)
else:
  print(abs)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = [int(x) for x in input().split()]

add_ab = a + b
sub_ab = a - b
kake_ab = a * b

print(max(add_ab, sub_ab, kake_ab))

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

if x < 0:
    if y < 0:
        print(x*y)
    else:
        print(x+y)
else:
    if y < 0:
        print(x-y)
    else:
        ad = x+y
        mu = x*y
        if ad < mu:
            print(mu)
        else:
            print(ad)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
cmdvar=input()
in_splited=cmdvar.split()

A=in_splited[0]
B=in_splited[1]

tmp=[]
tmp.append(int(A)+int(B))
tmp.append(int(A)-int(B))
tmp.append(int(A)*int(B))
ans=sorted(tmp,reverse=True)
print(ans[0])

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = (int(x) for x in input().split())
c = A + B
d = A - B
e = A * B

if c <= d:
    if d <= e:
        print(e)
    if d > e:
        print(d)

if c > d:
    if c >= e:
        print(c)
    if c < e:
        print(e)

Submission status: Accepted

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

Submission status: Accepted

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

num1 = int(i[0])
num2 = int(i[1])

max = num1 + num2

if max < num1 - num2:
	max = num1 - num2
if max < num1 * num2:
	max = num1 * num2

print(max)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = list(map(int, input().rstrip().split(" ")))

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

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())
s = A+B
p=A-B
q=A*B

if s >=p:
   if s >=q:
    print (s)
   else:
    print(q)
else:
   if p >=q:
      print (p)
   else: 
       print(q)

Submission status: Accepted

Solution code:
# -*- config: utg-8 -*-

i = list(map(int, input().split()))

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

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

print(max(wa,sa,seki))

Submission status: Accepted

Solution code:
l= [int(x) for x in input().split()]
p=[]
p.append(l[0]-l[1])
p.append(l[0]+l[1])
p.append(l[0]*l[1])
print(max(p))

Submission status: Accepted

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

Submission status: Accepted

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

tasu = A+B
hiku = A-B
kakeru = A *B

ans =0

if tasu >= hiku and tasu >= kakeru:
  ans = tasu
elif hiku >= tasu and hiku >= kakeru:
  ans = hiku
elif kakeru >= tasu and kakeru >= hiku:
  ans = kakeru

print(ans)

Submission status: Accepted

Solution code:
import sys

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

s = a + b
h = a - b
m = a * b

l = [s,h,m]
print(max(l))

Submission status: Accepted

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

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

MAX = -100000
for x in a:
    if x >= MAX:
        MAX = x

print(MAX)

Submission status: Accepted

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

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

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
if plus >= minus and plus >= multi:
    print(plus)
elif minus >= plus and minus >= multi:
    print(minus)
elif multi >= plus and multi >= minus:
    print(multi)

Submission status: Accepted

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

def sum(x, y):
  return x + y

def minus(x, y):
  return x - y

def duplicate(x, y):
  return x * y

ans = [sum(a, b), minus(a, b), duplicate(a, b)]

print(max(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
plus = A+B
minus = A-B
mul = A*B

print(max(plus, minus, mul))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
plus = a + b
minus = a - b
mult = a * b
ans = max(plus, minus)
ans = max(ans, mult)
print(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())

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

print(max(lists))

Submission status: Accepted

Solution code:
# coding: utf-8


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

    mx = a + b

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

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

    print(mx)

main()

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

Solution code:
N, M = map(int, input().split())

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

Submission status: Accepted

Solution code:
param = list(map(int, input().split()))
a = param[0]
b = param[1]
wa = a + b
sa = a - b
seki = a * b
ret = wa if wa > sa else sa
ret = ret if ret > seki else seki
print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum = A + B
dele = A - B
mul = A * B

print(max(sum, dele, mul))

Submission status: Accepted

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

Submission status: Accepted

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

a1 = A+B
a2 = A-B
a3 = A*B

am = max([a1,a2,a3])

print(am)

Submission status: Accepted

Solution code:
#coding utf-8

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

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

print(max(x))

Submission status: Accepted

Solution code:
l = raw_input().split() 
A=int(l[0])
B=int(l[1])

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

Submission status: Accepted

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

wa = A + B
sa = A - B
seki = A * B

if wa < sa:
    if sa <= seki:
        print(seki)
    else:
        print(sa)

if wa >= sa:
    if wa >= seki:
        print(wa)
    else:
        print(seki)

Submission status: Accepted

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

Submission status: Accepted

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

resolve()

Submission status: Accepted

Solution code:
#coding : utf-8

import os
import sys

A, B = map(lambda x: int(x), 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:
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import heapq, bisect


from math import factorial
# 組み合わせ
def combinations_count(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

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

ApB = A + B
AmB = A - B
AbB = A*B

nums = [ApB, AmB, AbB]

nums.sort(reverse=True)

print(nums[0])

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 = input().split()
a = int(A)
b = int(B)
seki = a*b
wa = a+b
sa = a-b
if seki >= wa and seki >= sa:
    print(seki)
elif wa >= seki and wa>= sa:
    print(wa)
else:
    print(sa)

Submission status: Accepted

Solution code:
#coding: utf-8
a, b = map(int, input().split())

intt_array = [0] * 3
intt_array[0] = a + b
intt_array[1] = a - b
intt_array[2] = a * b
# intt_array[3] =

intt_array.sort(reverse=True)
print(intt_array[0])

Submission status: Accepted

Solution code:
A,B=(input().split(' '))
A=int(A)
B=int(B)
AplusB=A+B
AminusB=A-B
AmultiplyB=A*B
ans=AplusB if AplusB>AminusB else AminusB
ans=ans if ans>AmultiplyB else AmultiplyB
print(ans)

Submission status: Accepted

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

ab_sum = a + b
ab_dif = a - b
ab_mul = a * b

print(max([ab_sum, ab_dif, ab_mul]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a, b = list(map(int, input().split()))
m = -200000
if m < a + b:
    m = a+b
if m < a - b:
    m = a-b
if m < a*b:
    m = a*b

print(m)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

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=(int(x) for x in input().split())
sum=a+b
minus=a-b
kakeru=a*b

if sum>=minus and sum>=kakeru:
  print(sum)
elif minus>=sum and minus>=kakeru:
  print(minus)
elif kakeru>=sum and kakeru>=minus:
  print(kakeru)

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())
tmp = A+B if B>0 else A-B
tmp = A*B if A*B > tmp else tmp
print(tmp)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(arr))

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 = input().split(" ")
a = int(a)
b = int(b)

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

print(res)

Submission status: Accepted

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

Ans1=A+B
Ans2=A-B
Ans3=A*B


print(max(Ans1,Ans2,Ans3))

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

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

# print(a, b, c)

l = [a, b, c]

print(max(l))

Submission status: Accepted

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

Submission status: Accepted

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

n = int(a[0])
m = int(a[1])

l = [0, 0, 0]
l[0] = n + m
l[1] = n - m
l[2] = n * m

print(max(l))

Submission status: Accepted

Solution code:
import numpy as np
n1, n2=input().split(' ')
n1 = int(n1)
n2 = int(n2)
a = np.array([n1 + n2, n1 - n2, n1 * n2])
print(a.max())

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:
	max = add
elif sub >= add and sub >= mul:
  	max = sub
else:
    max = mul
print(max)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
calc_results = [a+b, a-b, a*b]
print(max(calc_results))

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

Solution code:
i= input().split()
j=int(i[0])
k=int(i[1])

print(max(j+k,j-k,j*k))

Submission status: Accepted

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

max = A + B
hiku = A - B
kake = A * B

if max < hiku:
    max = hiku

if max < kake:
    max = kake

print(max)

Submission status: Accepted

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

def hantei(A, B):
    tasu = A + B
    hiku = A - B
    kake = A * B
    if tasu >= hiku:
        if tasu >= kake:
            return(tasu)
        else:
            return(kake)
    else:
        if hiku >= kake:
            return(hiku)
        else:
            return(kake)
print(hantei(A,B))

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
p = a + b
q = a - b
r = a * b
if p < q:
    if q < r:
        print(r)
    else:
        print(q)
else:
    if p < r:
        print(r)
    else:
        print(p)

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
a = A + B
b = A - B
c = A * B
if a >= b:
    if a >= c:
        print(a)
    else:
        print(c)
elif b >= c:
    print(b)
else:
    print(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())
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())
X = int(a + b)
Y = int(a - b)
Z = int(a * b)
ans = [X,Y,Z]
print(max(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:
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())
num = A + B

if num < A - B:
    num = A - B

if num < A * B:
    num = A * B

print(num)

Submission status: Accepted

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


c1=a+b
c2=a-b
c3=a*b

if c1>=c2 and c1>=c3:
    print(c1)

elif c2>=c1 and c2>=c3:
    print(c2)
else:
    print(c3)

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())
tasu=A+B
hiku=A-B
kake=A*B
if tasu>=hiku and tasu>=kake:
  print(tasu)
elif hiku>=tasu and hiku>=kake:
  print(hiku)
else:
  print(kake)

Submission status: Accepted

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

a = int(lis[0]) + int(lis[1])
b = int(lis[0]) - int(lis[1])
c = int(lis[0]) * int(lis[1])

if a > b:
    m = a
    if m > c:
        pass
    else:
        m = c
else:
    m = b
    if b > c:
        pass
    else:
        m = c
        
print(m)

Submission status: Accepted

Solution code:
import os
import sys

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

c=a+b
d=a-b
e=a*b

print(max(c,d,e))

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

k1 = a + b
k2 = a - b
k3 = a * b

if k1 > k2 :
    if k1 > k3 :
        print(k1)
    else :
        print(k3)
elif k2 > k3:
        print(k2)
else :
        print(k3)

Submission status: Accepted

Solution code:

a,b=map(int, 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)   
    
elif z>=x and z>=y:
    print(z)

Submission status: Accepted

Solution code:

L = map(int, raw_input().split())
A = L[0]
B = L[1]

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

Submission status: Accepted

Solution code:
import numpy as np

A,B=input().split()

array=np.zeros((3))

array[0]=int(A)+int(B)
array[1]=int(A)-int(B)
array[2]=int(A)*int(B)

print(int(np.max(array)))

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 = list(map(int,input().split()))
add = a+b
div = a-b
mlt = a*b
if add >= div and add>= mlt:
  print(add)
elif div >= add and div >= mlt:
  print(div)
elif mlt >= add and mlt >= div:
  print(mlt)

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

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

print(max(sum, sub, kake))

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

p = a[0] + a[1]
m = a[0] - a[1]
b = a[0] * a[1]

print(max(p, max(m, b)))

Submission status: Accepted

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

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

X.sort()
print(X[2])

Submission status: Accepted

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

num_list = []
sum_num = a + b
num_list.append(sum_num)
minus_num = a - b
num_list.append(minus_num)
multi_num = a * b
num_list.append(multi_num)

print(max(num_list))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=input().split(" ")
A=int(a[0])
B=int(a[1])
p=A+B
q=A-B
r=A*B
if p>=q:
    s=p-r
    if s>=0:
        print(p)
    else:
        print(r)
if q>p:
    s=q-r
    if s>=0:
        print(q)
    else:
        print(r)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 10 20:59:09 2019

@author: doppe
"""

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 = list(map(int, input().split()))
plus = A + B
minus = A - B
times = A * B
results = [plus, minus, times]
max_val = -float('inf')
for r in results:
  if r > max_val:
    max_val = r
print(max_val)

Submission status: Accepted

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

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()) 
sum1 = A + B
sum2 = A - B
sum3 = A * B

print(max([sum1, sum2, sum3]))

Submission status: Accepted

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

Submission status: Accepted

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

c=a+b
d=a-b
e=a*b

if c>d:
	if c>e:
		print(c)
	else:
		print(e)
else:
	if d>e:
		print(d)
	else:
		print(e)

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:
a,b = map(int,input().split(" "))
plus = a+b
sub = a-b
mul = a*b
max = plus if plus>sub else sub
max = mul if mul>max else max
print(max)

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)
else :
    print(c)

Submission status: Accepted

Solution code:
import numpy as np

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