Problem:


Score : 100 points

Problem Statement

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

Constraints

-1000 \leq A,B \leq 1000

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

3 1

Sample Output 1

4

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

Sample Input 2

4 -2

Sample Output 2

6

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

Sample Input 3

0 0

Sample Output 3

0



Sample input:
3 1


Sample output:
4

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
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())
    print(max(a+b, a-b, a*b))
main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 17:09:57 2020

@author: shinba
"""

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

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

A,B = inputIL()

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

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

input = sys.stdin.readline


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

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_98_A()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi#, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_rpw_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

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

    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:
def main():
    a,b = (int(x) for x in 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,max(a-b,a*b)))

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy
A, B = map(int, input().split())

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return list(sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

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

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
A, B =ri_()
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 = map(int,input().split())
dum1 = a+b
dum2 = a-b
dum3 = a*b
print(max(dum1,dum2,dum3))

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

print(max(x))

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

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

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

v1 = N+K
v2 = N-K
v3 = N*K
print(max(v1, v2, v3))

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc098/tasks/abc098_a


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


print(main())

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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

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())
l = [A + B, A - B, A * B]
l.sort(reverse=True)
print(l[0])

Submission status: Accepted

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

a = A + B
b = A - B
c = A * B
l = [a, b, c]
l.sort(reverse=True)
print(l[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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

Submission status: Accepted

Solution code:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=[int(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())

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    print(max(A + B, A - B, A * B))


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:
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())
    print(max(A+B, A-B, A*B))
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = input()
X = list(map(int, X.split()))
A = X[0]
B = X[1]
so = A+B
su = A-B
m = A*B
maior = so
if (su > maior):
    maior = su
if (m > maior):
    maior = m
print(maior)

Submission status: Accepted

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

res = [0]*3
res[0] = A+B
res[1] = A-B
res[2] = A*B

print(max(res))

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 math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a, b = nm()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
def resolve():
    A, B = list(map(int, input().split(" ")))
    print(max([A+B, A-B, A*B]))

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
k = sorted([n+m, n-m, n*m], reverse=True)
print(k[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(max(c))

Submission status: Accepted

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

Submission status: Accepted

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

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

if s>=sub and s>=m:
    print(s)
elif sub>=s and sub>=m:
    print(sub)
else:
    print(m)

Submission status: Accepted

Solution code:
line = input()
a, b = [int(n) for n in line.split()]
soma, mult, minus = a+b, a*b, a-b 
if(soma > mult and soma > minus):
    print(soma)
elif(mult > minus):
    print(mult)
else:
    print(minus)

Submission status: Accepted

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

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

print (l[2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

ans1, ans2, ans3=X+Y, X-Y, X*Y
if (ans1>=ans2 and ans1>=ans3):
  print(X+Y)

elif(ans2>=ans1 and ans2>=ans3):
  print(X-Y)

else:
  print(X*Y)

Submission status: Accepted

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

Submission status: Accepted

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

soma = A+B
sub = A-B
mult = A*B

lista=[soma,sub,mult]
print(max(lista))

Submission status: Accepted

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

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

if sum > mult and sum > sub:
    print(sum)
elif mult > sum and mult > sub:
    print(mult)
else:
    print(sub)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input()
X,Y = [int(n) for n in line.split()]

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

res = max(a,b,c)

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
line = input()
A, B = [int(n) for n in line.split()]
r1 = A+B
r2 = A-B
r3 = A*B

r4 = max(r1, r2)
r4 = max(r4, r3)
print(r4)

Submission status: Accepted

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

largest = 0

x = [a+b, a-b, a*b]
x.sort()

print(x[-1])

Submission status: Accepted

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


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

print(max(c))

Submission status: Accepted

Solution code:
line = input()

a, b = [int(n) for n in line.split()]

apb = a+b
asb = a-b
atb = a*b

print(max(apb, asb, atb))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

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

Submission status: Accepted

Solution code:
a, b = [int(elem) for elem 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()]

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:
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 - Add Sub Mul
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())
lists=[A+B,A-B,A*B]
print(max(lists))

Submission status: Accepted

Solution code:
# ABC 098: A – Add Sub Mul
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())

tasu = a +b
hiku = a - b
kake = a * b

line = [tasu,hiku,kake]
line.sort()

print(line[2])

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
Add = A + B
Sub = A - B
Mul = A * B

print(max(Add, Sub, Mul))

Submission status: Accepted

Solution code:
import itertools
def main():
  a,b = map(int,input().split())
  m = a+b
  m = max(m,a-b)
  m = max(m,a*b)
  print(m)
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
A,B = map(int,input().split(" "))
Max = max([A+B, A-B, 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())
ans1 = a+b
ans2 = a-b
ans3 = a*b
print(max(ans1,ans2,ans3))

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().split())

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

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

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

if __name__ == '__main__':
    a = [int(i) for i in 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())

c = A + B
d = A - B
e = A * B
print(max(c, d, e))

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
a,b= iim()
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())

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

if a1 >= a2 and a1 >= a3:
	print(a1)
elif a2 >= a1 and a2>= a3:
	print(a2)
elif a3 >= a1 and a3 >= a2:
	print(a3)

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(j) for j in input().split()]
from collections import Counter
#template
#issueから始める
A,B = inputlist()
print(max(A+B,A-B,A*B))

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

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:
def Add_Sub_Mul(a , b):

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


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())
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 - Add Sub Mul
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:
A,B=tuple(map(int,input().split()));print(max([A+B,A-B,A*B]))

Submission status: Accepted

Solution code:
A,B=tuple(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:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#098_A
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 = 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:
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())
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,raw_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())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda x: [ni() for _ in range(x)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda x: [ns() for _ in range(x)]
nas = lambda: stdin.readline().split()

a, b = na()

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

Submission status: Accepted

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