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

Submission status: Accepted

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

n_list.append(a+b)
n_list.append(a-b)
n_list.append(a*b)

print(max(n_list))

Submission status: Accepted

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

print(max(a,b,c))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, B] = [int(input_raw[0]), int(input_raw[1])]
    print max(A + B, A - B, A * B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#n=int(input())
#L=list(map(int,input().split()))
a,b=map(int,input().split())
#A=[[0 for i in range()] for j in range()]

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

Submission status: Accepted

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

ans = a + b

if ans < a-b:
    ans = a-b
if ans < a*b:
    ans = a*b
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
a=[]
a.append(n+m)
a.append(n-m)
a.append(n*m)
a.sort()
print(a[-1])

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

b=[a[0]+a[1],a[0]-a[1],a[0]*a[1]]
b.sort()
print(b[-1])

Submission status: Accepted

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

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

print(max(a,b,c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019/08/10

n,m=map(int,input().split())

ans=max(n+m,n-m,n*m)
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy
from __future__ import division, print_function

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


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


# region fastio

BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count("\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

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())
tmp = -9999999999999999

if tmp < A + B:
    tmp = A + B
if tmp < A - B:
    tmp = A - B
if tmp < A * B:
    tmp = A * B
print(tmp)

Submission status: Accepted

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

import sys
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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(' ')))
N = [A + B, A - B, A * B]
print(max(N))

Submission status: Accepted

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

test = []
test.append(A + B)
test.append(A - B)
test.append(A * B)
print(max(test))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

main()

Submission status: Accepted

Solution code:
import math
import sys
import itertools
import queue
from fractions import gcd

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

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    A,B= map(int, sys.stdin.readline().split())
    l=[A+B,A-B,A*B]
    print(max(l))

Submission status: Accepted

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

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

print(max_num)

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

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

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

a, b = MAP()
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)

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

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
#N = int(input())
A, B = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]
a1 = A + B
a2 = A - B
a3 = A * B
print(max(a1, a2, a3))
#sys.exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# Yet I'm feeling like
# 	There is no better place than right by your side
# 		I had a little taste
# 			And I'll only spoil the party anyway
# 				'Cause all the girls are looking fine
# 					But you're the only one on my mind


import sys
inf = float("inf")
#sys.setrecursionlimit(1000000)


# abc='abcdefghijklmnopqrstuvwxyz'
# abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod,MOD=1000000007,998244353
# vow=['a','e','i','o','u']
# dx,dy=[-1,1,0,0],[0,0,1,-1]

#from cmath import sqrt
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
# from math import ceil,floor,log,sqrt,factorial,pow,pi,gcd,log10
#from bisect import bisect_left,bisect_right
#import numpy as np

def get_array(): return list(map(int , sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()

a,b=get_ints()
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:
s = input().split()
A = int(s[0])
B = int(s[1])

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int):
    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(A, B, C)
ans1 = A + B
ans2 = A - B
ans3 = A * B
print(max(max(ans1, ans2), ans3))

Submission status: Accepted

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

ansA = A + B
ansB = A - B
ansC = A * B

print(max(ansA, ansB, ansC))

Submission status: Accepted

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

Submission status: Accepted

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


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

print(int(ans))

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict
# t=int(raw_input())
# while(t!=0):
#     t=t-1

a,b=map(int,raw_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 = (int(i) for i in input().split())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(max(sum, sub, mult))

Submission status: Accepted

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


def get_num():
    return int(input())


def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(input())
    return res


def get_numbers():
    return map(int, input().split())


a, b = get_numbers()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
#debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    a, b = LI()

    a1 = a + b
    a2 = a - b
    a3 = a * b
    print(max(a3, max(a1, a2)))

solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# N = int(input())
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())
c1=A+B
c2=A-B
c3=A*B
print(max(c1,c2,c3))

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:
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 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A,B = inputMap()

	tmp = A+B
	tmp2=A-B
	tmp3=A*B
	print(max(tmp,tmp2,tmp3))



if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import sys
def main():
    input = sys.stdin.readline
    AB = list(map(int, input().split()))
    A = AB[0]
    B = AB[1]
    li = [A+B, A-B, A*B]

    ans = max(li)
    print(ans)

if __name__ == '__main__':
    main()

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

hoge = A+B
fuga = A-B
piyo = A*B

ans = max(hoge, fuga)
ans = max(ans, piyo)

print(ans)

Submission status: Accepted

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

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

x = a+b
y = a-b
z = a*b
print(max([x,y,z]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from collections import defaultdict, deque
import math
from math import factorial
import fractions
import re
import bisect

BIGNUM = 10 ** 9 + 7

def main():
    A, B = map(int, input().split())
    #N = int(input())
    #Hs = list(map(int, input().split()))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def readInts():
  return [int(s) for s in input().split(" ")]

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

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

Submission status: Accepted

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

n=[0]*3

n[0]=a+b
n[1]=a-b
n[2]=a*b

print(max(n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
(A, B) = tuple([int(s) for s 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(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())
l = [a+b,a-b,a*b]
print(max(l))

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

x = a + b
y = a - b
z = a * b
print(max(x,y,z))

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


def solve(A: int, B: int):
    temp1 = A + B
    temp2 = A - B
    temp3 = A * B
    ans_list = [temp1, temp2, temp3]
    print(max(ans_list))
    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:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


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


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    return max([A+B, A-B, A*B])


def main():
    A, B = read_int_n()
    print(slv(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 InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A
    
if __name__ == '__main__':
    A, B = InputToInt()
    print(max(A+B, A-B, A*B))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    a, b = LI()
    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


def input():
    return sys.stdin.readline()[:-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 = list(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] = [int(num) for num in input().split()]
print(max(max(a + b, a - b), a * b))

Submission status: Accepted

Solution code:
if __name__ == '__main__':

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

Submission status: Accepted

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

pl = a+b
mi = a - b
mul = a * b
ans = max(pl, mi, mul)

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
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())
lst = [a+b, a-b, a*b]
print(max(lst))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a,b= [ int(x) for x in sys.stdin.readline().split() ]
print( max(a+b,a-b,a*b) )

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    a, b = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    A, B = MAP()
    X = [A + B, A * B, A - B]
    print(max(X))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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(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 = [int(n) for n 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 = [int(i) for i in input().split(" ")]
# A = int(input())
# As = [int(i) for i in input().split(" ")]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys

input = sys.stdin.readline

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

main()

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
# ABC137a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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