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

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

print(max(v))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
  main()

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())
if -100 <= a <= 100 and -100 <= b <= 100:
    plus = a + b
    minus = a - b
    multiple = a * b
    print(max(plus, minus, multiple))
else:
    print('a or b is invalid value.')

Submission status: Accepted

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

Submission status: Accepted

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

max=A+B

now=A-B
if(max<now):
  max=now

now=A*B
if(max<now):
  max=now

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

a = int(a)
b = int(b)

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

if wa >= sa and wa >= seki:
    print(str(wa))
elif sa >= wa and sa >= seki:
    print(str(sa))
else:
    print(str(seki))

Submission status: Accepted

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

seki = int(a) * int(b)
sa = int(a) - int(b)
wa = int(a) + int(b)

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

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

wa = int(a) + int(b)
sa = int(a) - int(b)
seki = int(a) * int(b)

if wa >= sa and wa >= seki:
    print(str(wa))
elif sa >= wa and sa >= seki:
    print(str(sa))
else:
    print(str(seki))

Submission status: Accepted

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

solve()

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

Submission status: Accepted

Solution code:
a, b = tuple([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())
test1 = A+B
test2 = A-B
test3 = A*B
if test1 >= test2 and test1 >= test3:
  print(test1)
elif test2 >= test1 and test2 >= test3:
  print(test2)
elif test3 >= test1 and test3 >= test2:
  print(test3)

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

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

Submission status: Accepted

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

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())
wa = a + b
sa = a - b
seki = a * b
list = [wa,sa,seki]
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())

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

print(max(tasu,hiku,kakeru))

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-
MOD = 10 ** 9 + 7

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

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

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

Submission status: Accepted

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

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)
    
else:
  if A>0:
    print(b)
  else:
    print(c)

Submission status: Accepted

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

sum_val = a+b
sub_val = a-b
tim_val = a*b

print(max([sum_val, sub_val, tim_val]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np
# import sys
# sys.setrecursionlimit(10**4)

def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


A, B = _li()
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())
s = a + b
t = a - b
u = a * b
x = sorted([s, t, u])
print(x[-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if B > 0:
    if A * B > (A + B):
        val = A * B
    else:
        val = A + B
else:
    if A * B > (A - B):
        val = A * B
    else:
        val = A - B
        
print("%d"%val)

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 permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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()))
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:
A, B = map(int, input().split())
if B > 0:
    if B == 1:
        val = A + B
    elif B >= 2:
        if A <= 1:
            val = A + B
        else:
            val = A * B
elif B == 0:
    if A > 0:
        val = A - B
    else:
        val = A * B
else:
    if A >= 0:
        val = A - B
    else:
        val = A * B
        
print("%d"%val)

Submission status: Accepted

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

mymax = -999

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

Submission status: Accepted

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

Submission status: Accepted

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

print("%d"%val)

Submission status: Accepted

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

Submission status: Accepted

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

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(sorted([a+b, a-b, a*b], reverse=True)[0])

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

A,B = map(int,input().split())
ans = [A+B,A-B,A*B]
ans = np.sort(ans)
print (ans[-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC137 A

import numpy as np

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


if __name__ == "__main__":
    resolve()

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

R=[]

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

print(max(R))

Submission status: Accepted

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

import sys, os
#def input(*args):
#    pass

def main():
    a, b = map(int, input().split())
    #print("a: {}".format(a))
    add = a + b
    sub = (a - b)
    mul = a * b
    max_val = max(add, sub, mul)
    print(max_val)

if __name__ == "__main__" :
    main()

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

a = innum[0]
b = innum[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

if __name__ == "__main__":
    a, b = map(int, input().split(" "))
    ans = [a+b, a-b, a*b]
    print(max(ans))

Submission status: Accepted

Solution code:
A,B=map(int, input().split())
plus=A+B
minus=A-B
product=A*B
print("{}".format(max(plus,minus,product)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# We have two integers: A and B.
# Print the largest number among A + B , A − B , and A × B .
def main():
  a, b = input().split(' ')
  a, b = int(a), int(b)

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import logging

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
test = input().split(" ")
a = int(test[0])
b = int(test[1])
answer = a + b
diff = a - b
product = a * b
if answer < diff:
  answer = diff
if answer < product:
  answer = product
print(answer)

Submission status: Accepted

Solution code:
s = list(map(int,input().split()))
t = max(s[0]+s[1],s[0]-s[1],s[0]*s[1])
print(t)
'''
print('A+B={0},A-B={1},A*B={2},A/B={3}の中で最大の数{4}はです'.format(s[0]+s[1],s[0]-s[1],s[0]*s[1],s[0]/s[1],t))
'''

Submission status: Accepted

Solution code:
A,B = (int(a) for a in 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:
def calc(a,b):
  return [a+b, a-b, a*b]

s = list(map(int, input().split()))
res = calc(s[0], s[1])
print(max(res))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

plus = A + B
minus = A - B
product = A * B


print(max(plus,minus,product))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nums = list(map(int,input().split()))
sum = nums[0] + nums[1]
sub = nums[0] - nums[1]
mul = nums[0] * nums[1]
if sum >= sub and sum >= mul:
  print (sum)
elif sub >= sum and sub >= mul:
  print (sub)
else:
  print (mul)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc137a

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

Submission status: Accepted

Solution code:
#ACB-A1 2019

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

tasi = A+B
hiki = A-B
kake = A*B

ml=[tasi,hiki,kake]
mx=max(ml)


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

Submission status: Accepted

Solution code:
calc_result = []
result = input().split()
n1, n2 = int(result[0]), int(result[1])
calc_result.append(n1 + n2)
calc_result.append(n1 - n2)
calc_result.append(n1 * n2)
print(max(calc_result))

Submission status: Accepted

Solution code:
import math
import sys
import collections

# imgur.com/Pkt7iIf.png

def getdict(n):
    d = {}
    if type(n) is list:
        for i in n:
            if i in d:
                d[i] += 1
            else:
                d[i] = 1
    else:
        for i in range(n):
            t = ii()
            if t in d:
                d[t] += 1
            else:
                d[t] = 1
    return d
def cdiv(n, k): return n // k + (n % k != 0)
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(map(int, input().split()))
def lcm(a, b): return abs(a*b) // math.gcd(a, b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
def ii(): return int(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def li(): return list(mi())
a, b=mi()
print(max((a+b), (a-b), (a*b)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(max(li))

Submission status: Accepted

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

ad=a+b
su=a-b
mu=a*b

print(max(ad,su,mu))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-S
A,B = [int(i) for i in input().split()]

X = A + B
Y = A - B
Z = A * B

if X >= Y and X >= Z:
    print(X)
elif Y >= X and Y >= Z:
    print(Y)
elif Z >= X and Z >= Y:
    print(Z)

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

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

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

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

print(max(lst))

Submission status: Accepted

Solution code:
# your code goes here
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>c3:
	print(c2)
else:
	print(c3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

S = input().split()
X = int(S[0])+int(S[1])
Y = int(S[0])-int(S[1])
Z = int(S[0])*int(S[1])
if X >= Y:
    if X >= Z:
        print(X)
    else:
        print(Z)
else:
    if Y >= Z:
        print(Y)
    else:
        print(Z)

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:
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:
def solve(a, b):
    return max(a + b, a - b, a * b)


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

    ans = solve(a, b)
    print(ans)


main()

Submission status: Accepted

Solution code:
#coding: utf-8
s=list(map(int, input().split()))
add=s[0]+s[1]
sub=s[0]-s[1]
mul=s[0]*s[1]
print(max([add,sub,mul]))

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:
import numpy as np

A,B = map(int,input().split())
C = A+B
D = A-B
E = A*B
list_1 = [C,D,E]
list_1.sort()
print(list_1[2])

Submission status: Accepted

Solution code:
# -*- encoding: UTF-8 -*-
a, b = map(int, input().split())

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

tmp = 0
if c1 > c2 :
  tmp = c1
else :
  tmp = c2
  
if c3 > tmp :
  tmp = c3

print(tmp)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(arg: str) -> str:
    a, b = map(int, arg.split())
    ans = max((a+b), (a-b), (a*b))
    return str(ans)


if __name__ == "__main__":
    print(solve(input()))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(max(calc_list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
number = list(map(int,input().split()))
list = [0,0,0]
list[0] = number[0]+number[1]
list[1] = number[0]-number[1]
list[2] = number[0]*number[1]
print(max(list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()

A = int(x.split()[0])
B = int(x.split()[1])

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

Submission status: Accepted

Solution code:
import sys

S = input().split()
A = int(S[0])
B = int(S[1])
maxval = -sys.maxsize

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

if add > maxval:
    maxval = add
if diff > maxval:
    maxval = diff
if mul > maxval:
    maxval = mul

print(maxval)

Submission status: Accepted

Solution code:
num = input().split()
n1 = int(num[0])
n2 = int(num[1])
plus = n1 + n2
minus = n1 - n2
mul = n1 * n2
max = max(max(plus,minus), mul)
print(max)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力を受け取る
c = list(map(int,input().split()))

# リストから要素を取り出す
a = c[0]
b=c[1]
# 出力(print)
print(max(a+b,a-b,a*b))

Submission status: Accepted

Solution code:
intlist= [i for i in input().split()]
a = int(intlist[0])
b = int(intlist[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys

a, b = map(int, input().split())
 
sum = a + b
minus = a - b
sub = a * b
 
if (sum - minus) > 0:
  if (sum - sub) > 0:
    print(sum)
  else:
    print(sub)
else:
  if (minus - sub) > 0:
    print(minus)
  else:
    print(sub)

Submission status: Accepted

Solution code:
# your code goes here
inline = list(map(int,input().split(" ")))
mx = inline[0] + inline[1]
mx = max(inline[0] - inline[1],mx)
mx = max(inline[0] * inline[1],mx)
print(mx)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

print('{}'.format(max(a+b, a-b, a*b)))

Submission status: Accepted

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

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

print(max_num)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
x = a + b
y = a - b
z = a * b
i = []
i.append(x)
i.append(y)
i.append(z)
i.sort()
print(i[-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
# a = int(input())
# スペース区切りの整数の入力
a, b = map(int, input().split())
# 文字列の入力
# s = input()
# 出力
print("{}".format(max(max(a+b, a-b), a*b)))

Submission status: Accepted

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

l=a+b
m=a-b
n=a*b

print(max(l,max(m,n)))

Submission status: Accepted

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

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

print(max(tasu,kakeru,hiku))

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

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

print(max(wa,sa,seki))

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())  
sum=a+b
dif=a-b
mul=a*b
 
 
if sum > dif:
    if mul>sum:
        print('{}'.format(mul))
    else:
        print('{}'.format(sum))
else:
    if mul>dif:
        print('{}'.format(mul))
    else:
        print('{}'.format(dif))

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


def solve(A: int, B: int):
    sum = A + B
    sub = A - B
    mul = A * B

    max = sum if sum > sub else sub
    max = max if max > mul else mul

    print(max)
    return 


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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 (a+b if a+b >= a-b and a+b >= a*b else a-b if a-b >= a+b and a-b >= a*b else a*b)

Submission status: Accepted

Solution code:


a, b = input().split()

a = int(a)
b = int(b)


sum = a + b
dif = a - b
pro = a * b


def greatest(a, b, c):
    if a > b:
        if a > c:
            return a
        else:
            return c
    else:
        if b > c:
            return b
        else:
            return c


print(greatest(sum, dif, pro))

Submission status: Accepted

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

Submission status: Accepted

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

N=A+B
M=A-B
B=A*B

saru=[N,M,B]
print(max(saru))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

mymax = -99999

if mymax < A + B:
  mymax = A + B

if mymax < A - B:
  mymax = A - B

if mymax < A * B:
  mymax = A * B


print(mymax)

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:
# -*- coding: utf-8 -*-
#空白区切りの整数の入力
A, B = map(int, input().split())
#出力
print(max(A+B, A-B, A*B))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import bisect
import collections
import itertools


def getint(): return int(input())
def getints(): return list(map(int, input().split()))
def getint2d(rows): return [getints() for _ in range(rows)]
def getgrid(rows): return [input() for _ in range(rows)]
def array1d(n, value): return [value for _ in range(n)]
def array2d(n, m, value): return [array1d(m, value) for _ in range(n)]

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

Submission status: Accepted

Solution code:
num1,num2 = map(int, input().split())

plus = num1 + num2
minus = num1 - num2
times = num1 * num2

total = [plus,minus,times]

print(max(total))

Submission status: Accepted

Solution code:
import math
from itertools import accumulate


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, input().split())

# 出力
print(max([a+b, a-b, a*b]))