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

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

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

Submission status: Accepted

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

x = A + B
y = A - B
z = A * B

if x >= y and x >= z:
	answer = x

elif y >= x and y >=z:
	answer = y

elif z >= x and z >= y:
	answer = z
    
print(answer)

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

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

Submission status: Accepted

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

max_n = -10000000000

if a+b > max_n:
    max_n = a +b

if a - b > max_n:
    max_n = a - b

if a*b > max_n:
    max_n = a*b

print(max_n)

Submission status: Accepted

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

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

print(max(tasu,hiku,kake))

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
i = a + b
k = a - b
j = a * b

print(max(i,k,j))

Submission status: Accepted

Solution code:
# Problem A - +-x

A, B = map(int, input().split())
num_list = []

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

ans_max = max(num_list)
print(ans_max)

Submission status: Accepted

Solution code:
# coding: utf-8

A, B = map(int, input().split())
# print(A, B)
S = A + B
D = A - B
P = A * B
print(max(S, D, P))
# print(S, D, P)

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,b = map(int,input().split())

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

ans = max(ans1,ans2,ans3)

print(ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

Submission status: Accepted

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

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

ans = max(add,sub,mul)
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#A -+-*
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())

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

print(max(results))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - +-x
https://atcoder.jp/contests/abc137/tasks/abc137_a

"""
import sys


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


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

sum=a+b
sub=a-b
multi=a*b
if ((sum>=sub)and(sum>=multi)):
    print(sum)
elif((sub>sum)and(sub>multi)):
    print(sub)
else:
    print(multi)

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())
X = A + B
Y = A - B
Z = A * B
if X >= Y and X >= Z:
     print(X)
elif Y >= Z and Y >= X:
     print(Y)
elif Z >= X and Z >= Y:
     print(Z)

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
def solve():
    N, M = map(int, input().split())
    return max(N+M, N-M, N*M)

print(solve())

Submission status: Accepted

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

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

tmp = max(plus,minus)
result = max(div,tmp)

print(result)

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())
plus = A + B
minus = A - B
multi = A * B
ans = plus if plus > minus else minus
ans = multi if multi > ans else ans
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


if __name__ == "__main__":
    solve()

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

    ans = a + b

    if ans < a - b:
        ans = a - b

    if ans < a * b:
        ans = a * b

    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
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 STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
def main():
    N, M = (int(i) for i in input().split())
    print(max(N+M, N-M, N*M))


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

Submission status: Accepted

Solution code:
# A - +-x
a,b=list(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]
c=a[1]
d=[0,0,0]
d[0]=b+c
d[1]=b-c
d[2]=b*c
print(max(d))

Submission status: Accepted

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

print(max(s,m,n))

Submission status: Accepted

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


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

# Generated by 1.1.6 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
    print(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:
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 if a+b>=a-b else a-b
ans2 = ans1 if ans1>=a*b else a*b
print(ans2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

a, b = (int(x) for x in stdin.readline().rstrip().split())
l = [a+b, a-b, a*b]

print(max(l))

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

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


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

    A, B = list(map(int, sys.stdin.readline().split()))

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
add=A+B
sub=A-B
mul=A*B
print(max(max(add,sub),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:
#import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    a, b = list(map(int,ipti().split()))
    ans = a + b
    ans = max(ans,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,max(a+b,a*b)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# abc137 A

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())
 
x = a + b
y = a - b
z = a*b
 
if x != y and y != z and x != z:
    if x > y and x > z:
        print(x)
    else:
        if y > z:
            print(y)
        else:
            print(z)
else:
    pass
if x == y and y ==  z and x == z:
    print(x)
else:
    pass
if x == y and x != z:
    if x > z:
        print(x)
    else:
        print(z)
else:
    pass
if y == z and y != x:
    if y > x:
        print(y)
    else:
        print(x)
else:
    pass
if x == z and x != y:
    if x > y:
        print(x)
    else:
        print(y)
else:
    pass

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

number = input().split(" ")
A = int(number[0])
B = int(number[1])
ans = []
ans.append(int(A + B))
ans.append(int(A - B))
ans.append(int(A * B))
ans.sort()
print(ans[-1])

Submission status: Accepted

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

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

if p >= m and p >= t:
    print(p)
elif m >= p and m >= t:
    print(m)
elif t >= p and t >= m:
    print(t)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
p = A+B
m = A-B
b = A*B
ans = max(p,m,b)
if ans == p:
  print(p)
elif ans == m:
  print(m)
else:
  print(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())

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

Submission status: Accepted

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

SUM = A + B
MINUS = A - B
kakeru = A * B

temp1 = max(SUM, MINUS)
temp2 = max(temp1, kakeru)

print(temp2)

Submission status: Accepted

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

p=A+B
q=A-B
r=A*B

print(max(p,q,r))

Submission status: Accepted

Solution code:
import sys

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

def main():
    return max(a+b, a-b, a*b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
X,Y,Z = 0,0,0

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

i = [X,Y,Z]
print(max(i))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
a=[0]*3
a[0]=A+B
a[1]=A-B
a[2]=A*B
print(max(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:
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())

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

Submission status: Accepted

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

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

print(max(x, y, z))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

class Input():
	def readInt(self):
		return int(input())

	def readIntArray(self):
		return [int(x) for x in input().split(" ")]

	def readString(self):
		return input()

	def readStringArray(self):
		return input().split(" ")

	def readFloat(self):
		return float(input())

	def readFloatArray(self):
		return [float(x) for x in input().split(" ")]

def main():
	inp = Input()
	a, b = inp.readIntArray()
	ans = max([a+b, a-b, a*b])
	print(ans)
	

if __name__ == "__main__":
   main()

Submission status: Accepted

Solution code:
In = input().split()
n1 = int(In[0])
n2 = int(In[1])
sum = n1 + n2; minus = n1 -n2; mult = n1*n2
if sum >= minus and sum >= mult:
    print(sum)
if minus > sum and minus > mult:
    print(minus)
if mult > sum and mult > minus:
    print(mult)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc137/tasks/abc137_a

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

tmp = A + B
ans = tmp
tmp = A - B
if tmp > ans: ans = tmp
tmp = A * B
if tmp > ans: ans = tmp

print(ans)

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
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

Submission status: Accepted

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

list = [A+B,A-B,A*B]
list.sort(reverse=True)

print(list[0])

Submission status: Accepted

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

if A == 1 and B == 1:
    print(2)
elif A > 1 and B == 1:
    print(A+B)
elif A == 1 and B > 1:
    print(A+B)
elif A < 0 and B < 0:
    print(A*B)
elif A > 0 and B <= 0:
    print(A-B)
elif A <= 0 and B > 0:
    print(A+B) 
else:
    print(A*B)

Submission status: Accepted

Solution code:
import sys

a, b = (int(x) for x in input().split())
print(max(a+b, a*b, a-b))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
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 = (int(ab) for ab in 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:
#!/usr/bin/env python3
# -*- 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, B = map(int, input().split())
List = [A+B, A-B, A*B]
List.sort()
print(List[2])

Submission status: Accepted

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

Submission status: Accepted

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

import sys

def log(*args, **kwargs):
    print(*args, file=sys.stderr)

log("hogehoge")

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


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



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:
#137 a
a,b=map(int,input().split())
w=a+b
k=a*b
h=a-b
ans=max(w,k,h)
print(ans)

Submission status: Accepted

Solution code:
# 参照: https://github.com/masakiaota/kyoupuro
import sys
row = sys.stdin.readline
def read_ints(row):
    return list(map(int, row().split()))
  
A,B = read_ints(row)
print(max(A+B, A-B, A*B))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

plus = a + b
minus = a - b
multi = a * b

lst = [plus, minus, multi]

print(max(lst))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

C = sorted([ A+B, A-B, A*B], reverse = True)
print(C[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 = (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())

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

if ans1>=ans2 and ans1>=ans3:
    print(ans1)
elif ans2>=ans1 and ans2>=ans3:
    print(ans2)
elif ans3>=ans1 and ans3>=ans2:
    print(ans3)

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

Submission status: Accepted

Solution code:
import numpy as np
list=input().split()

for i in range(2):
    if i==0:
        A=int(list[i])
    if i==1:
        B=int(list[i])

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

if sum>sub:
    if product>sum:
        print(int(product))
    else:#sum>=product
        print(sum)
else:#sum<=sub
    if product>sub:
        print(int(product))
    else:#product<=sub
        print(int(sub))

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

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

if sum >= sub and sum >= mul:
    print(sum)
elif sub >= sum and sub >= mul:
    print(sub)
else:
    print(mul)

Submission status: Accepted

Solution code:
TANO,C=map(int,input().split())
HARD=TANO+C
CORE=TANO-C
print(max(HARD,CORE,TANO*C))

Submission status: Accepted

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

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

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

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

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:
def main():
    a,b = map(int, input().split())
    
    x = a + b
    y = a - b
    z = a * b

    print(max(x,y,z))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(max(ans_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())
c=a+b
e=a*b
d=a-b
print(max(c,e,d))

Submission status: Accepted

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

Submission status: Accepted

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

h = a * b
j = a + b
k = a - b

l = [h, j, k]
l.sort()

print(l[-1])

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

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:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

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