Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
x = []
y = []
for i in range(N):
    x[i], y[i] = map(int, (input().split( )))

aaa = 0
for i in range(N):
    for k in range(N):
        aaa += ((x[i] - x[k])**2+(y[i] - y[k])**2)**0.5
print(aaa/N)

Fixed submission:
N = int(input())
x = []
y = []
for i in range(N):
    a,b = map(int, (input().split()))
    x.append(a)
    y.append(b)

aaa = 0
for i in range(N):
    for k in range(N):
        aaa += ((x[i] - x[k])**2+(y[i] - y[k])**2)**0.5
print(aaa/N)

Buggy python submission (verdict: Runtime Error):
N = int(input())
x = []
y = []
for i in range(N):
    x[i], y[i] = map(int, (input().split(" ")))
roop = []
import itertools
for i in itertools.permutations(range(N), r=2):
    roop.append(i)
aaa = 0
for i in roop:
    aaa += ((x[i[0]] - x[i[1]])**2+(y[i[0]] - y[i[1]])**2)**0.5
print(aaa/N)

Fixed submission:
N = int(input())
x = []
y = []
for i in range(N):
    a,b = map(int, (input().split()))
    x.append(a)
    y.append(b)

aaa = 0
for i in range(N):
    for k in range(N):
        aaa += ((x[i] - x[k])**2+(y[i] - y[k])**2)**0.5
print(aaa/N)

Buggy python submission (verdict: Runtime Error):
N = int(input())
x = []
y = []
for i in range(N):
    x[i], y[i] = map(int, (input().split( )))
roop = []
import itertools
for i in itertools.permutations(range(N), r=2):
    roop.append(i)
aaa = 0
for i in roop:
    aaa += ((x[i[0]] - x[i[1]])**2+(y[i[0]] - y[i[1]])**2)**0.5
print(aaa/N)

Fixed submission:
N = int(input())
x = []
y = []
for i in range(N):
    a,b = map(int, (input().split()))
    x.append(a)
    y.append(b)

aaa = 0
for i in range(N):
    for k in range(N):
        aaa += ((x[i] - x[k])**2+(y[i] - y[k])**2)**0.5
print(aaa/N)

Buggy python submission (verdict: Runtime Error):
N = int(input())
x = []
y = []
for i in range(N):
    x[i], y[i] = map(int, (input().split()))
roop = []
import itertools
for i in itertools.permutations(range(N), r=2):
    roop.append(i)
aaa = 0
for i in roop:
    aaa += ((x[i[0]] - x[i[1]])**2+(y[i[0]] - y[i[1]])**2)**0.5
print(aaa/N)

Fixed submission:
N = int(input())
x = []
y = []
for i in range(N):
    a,b = map(int, (input().split()))
    x.append(a)
    y.append(b)

aaa = 0
for i in range(N):
    for k in range(N):
        aaa += ((x[i] - x[k])**2+(y[i] - y[k])**2)**0.5
print(aaa/N)

Buggy python submission (verdict: Runtime Error):
N = int(input())
x = []
y = []
for i in range(N):
    x[i], y[i] = map(int, (input().split()))

roop = []
import itertools

for i in itertools.permutations(range(N)):
    roop.append(i)
aaa = 0
for i in roop:
    for l in i:
        aaa += ((x[l] - x[l+1])**2+(y[l] - y[l+1])**2)**0.5
print(aaa/N)

Fixed submission:
N = int(input())
x = []
y = []
for i in range(N):
    a,b = map(int, (input().split()))
    x.append(a)
    y.append(b)

aaa = 0
for i in range(N):
    for k in range(N):
        aaa += ((x[i] - x[k])**2+(y[i] - y[k])**2)**0.5
print(aaa/N)
Buggy python submission (verdict: Runtime Error):
n,x=map(int,input().split())
L = list(map(int, input().split()))
c = 0
D = 0
for i in L:
  	c = c + 1
    D = D + i
    if D > x:
        print(c)
        exit()
if D > x:
  print(c)
else:
  print(c+1)


Fixed submission:
n,x=map(int,input().split())
L = list(map(int, input().split()))
c = 1
D = 0
for i in L:	
    D = D + i
    if D > x:
        print(c)
        exit()
    c = c + 1
print(c)
Buggy python submission (verdict: Runtime Error):
x, a, b = map(int, (inp.readline().rstrip().split()))
if a < x:
    a_abs = x-a
else:
    a_abs = a-x

if b < x:
    b_abs = x-b
else:
    b_abs = b-x
if a_abs > b_abs:
    print("B")
else:
    print("A")

Fixed submission:
x, a, b = map(int, (input().split()))

if a < x:
    a_abs = x-a
else:
    a_abs = a-x

if b < x:
    b_abs = x-b
else:
    b_abs = b-x
if a_abs > b_abs:
    print("B")
else:
    print("A")

Buggy python submission (verdict: Runtime Error):
if a < x:
    a_abs = x-a
else:
    a_abs = a-x

if b < x:
    b_abs = x-b
else:
    b_abs = b-x
if a_abs > b_abs:
    print("B")
else:
    print("A")

Fixed submission:
x, a, b = map(int, (input().split()))

if a < x:
    a_abs = x-a
else:
    a_abs = a-x

if b < x:
    b_abs = x-b
else:
    b_abs = b-x
if a_abs > b_abs:
    print("B")
else:
    print("A")
Buggy python submission (verdict: Runtime Error):
S = input()
S_list = list(set(S))
string = "qazwsxedcrfvtgbyhnujmikolp"
str_list = list(string)
str_list.sort()
for a in S_list:
    str_list.remove(a)
print(str_list.pop(0))

Fixed submission:
S = input()
S_list = list(set(S))
string = "qazwsxedcrfvtgbyhnujmikolp"
str_list = list(string)
str_list.sort()
for a in S_list:
    str_list.remove(a)
if str_list == []:
    print("None")
else:
    print(str_list.pop(0))
Buggy python submission (verdict: Runtime Error):
n_str = input()
n_list = list(n_str)
n_list_reverse = list(n_str)
n_list_reverse.reverse()
if n_list == n_list_reverse():
    print("Yes")
else:
    print("No")

Fixed submission:
n_str = input()
n_list = list(n_str)
n_list_reverse = list(n_str)
n_list_reverse.reverse()
if n_list == n_list_reverse:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int, (input().split))
if a < c and b < d:
    print(b-c)
elif c < a and b < d:
    print(b-a)
elif a < c and d < b:
    print(d-c)
elif c < a and d < b:
    print(d-a)
else:
    print(0)

Fixed submission:
a,b,c,d = map(int, (input().split()))


if a <= c and b <= d and c <= b:
    print(b-c)
elif c <= a and b <= d:
    print(b-a)
elif a <= c and d <= b:
    print(d-c)
elif c <= a and d <= b and a <= d:
    print(d-a)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int, input().split)
if a < c and b < d:
    print(b-c)
elif c < a and b < d:
    print(b-a)
elif a < c and d < b:
    print(d-c)
elif c < a and d < b:
    print(d-a)
else:
    print(0)

Fixed submission:
a,b,c,d = map(int, (input().split()))


if a <= c and b <= d and c <= b:
    print(b-c)
elif c <= a and b <= d:
    print(b-a)
elif a <= c and d <= b:
    print(d-c)
elif c <= a and d <= b and a <= d:
    print(d-a)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
# B_A to Z String
import sys

s = input()

def getNum(s) :
    for i in range(len(s)):
        for j in reversed(range(len(s))):
            if s[i] == 'A' and s[j] == 'Z' :
                res = j - i + 1
                return res
print(getNum(s))

Fixed submission:
# B_A to Z String

s = input()

def getNum(s) :
    a = s.find("A")
    b = s.rfind("Z")
    return b - a + 1
print(getNum(s))
Buggy python submission (verdict: Time Limit Exceeded):
# Sum of Three Integers
import sys

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

def getAns(k, s) :
    cnt = 0
    for x in range(k + 1) :
        for y in range(k + 1) :
            for z in range(k + 1) :
                if x + y + z == s :
                    cnt += 1
    return cnt
print(getAns(K, S))

Fixed submission:
# Sum of Three Integers
import sys

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

def getAns(k, s) :
    cnt = 0
    for x in range(k + 1) :
        for y in range(k + 1) :
            z = s - x - y
            if 0 <= z <= k :
                cnt += 1
    return cnt
print(getAns(K, S))
Buggy python submission (verdict: Runtime Error):
A, B = list(map(int, input().split()))
ans = [1,2,3]
ans.remove(A)
ans.remove(B)

print(ans[0])

Fixed submission:
A = int(input())
B = int(input())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)

print(ans[0])
Buggy python submission (verdict: Runtime Error):
N = int(input())
arr = list(map(int, input().split()))

i = 1
while i <= len(arr):
  while arr[i - 1] != i and i <= len(arr):
    arr.pop(i - 1)
  if arr[i - 1] == i:
    if i == len(arr):
      print(N - i)
      exit(0)
    else:
      i += 1
  else:
    print(-1)
    exit(0)

Fixed submission:
N = int(input())
arr = list(map(int, input().split()))

i = 0
err = True
for num in arr:
  if num == i + 1:
    i += 1
    err = False
if err:
  print(-1)
else:
  print(N - i)
Buggy python submission (verdict: Runtime Error):
X = int(input())

n = math.floor(X/100)
remain = X % 100
print(n>= 1 && remain <= n*5)

Fixed submission:
X = int(input())

for i in range(X+1):
  if X >= 100*i and X <= 105*i:
    print(1)
    exit(0)
print(0)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = str(i).zfill(3)
  f = 0
  for j in range(N):
    if S[j] == c[f]:
      f += 1
    if f == 3:
      break
  if f == 3:
    cnt += 1
print(cnt)


Fixed submission:
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = str(i).zfill(3)
  if c[0] in S:
        index1 = S.index(c[0])
        if c[1] in S[index1+1:]:
            index2 = index1 + 1 + S[index1+1:].index(c[1])
            if c[2] in S[index2+1:]:
                cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = [str(i // 100), str((i // 10) % 10), str(i % 10)]
  f = 0
  for j in range(N):
    if S[j] == c[f]:
      f += 1
    if f == 3:
      break
  if f == 3:
    cnt += 1
print(cnt)


Fixed submission:
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = str(i).zfill(3)
  if c[0] in S:
        index1 = S.index(c[0])
        if c[1] in S[index1+1:]:
            index2 = index1 + 1 + S[index1+1:].index(c[1])
            if c[2] in S[index2+1:]:
                cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = [i // 100, (i // 10) % 10, i % 10]
  f = 0
  for j in range(N):
    if int(S[j]) == c[f]:
      f += 1
    if f == 3:
      break
  if f == 3:
    cnt += 1
print(cnt)


Fixed submission:
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = str(i).zfill(3)
  if c[0] in S:
        index1 = S.index(c[0])
        if c[1] in S[index1+1:]:
            index2 = index1 + 1 + S[index1+1:].index(c[1])
            if c[2] in S[index2+1:]:
                cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = [i // 100, (i // 10) % 10, i % 10]
  f = 0
  for j in range(N):
    if S[j] == str(c[f]):
      f += 1
    if f == 3:
      break
  if f == 3:
    cnt += 1
print(cnt)


Fixed submission:
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = str(i).zfill(3)
  if c[0] in S:
        index1 = S.index(c[0])
        if c[1] in S[index1+1:]:
            index2 = index1 + 1 + S[index1+1:].index(c[1])
            if c[2] in S[index2+1:]:
                cnt+=1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = [i // 100, (i // 10) % 10, i % 10]
  f = 0
  for j in range(N):
    if S[j] == str(c[f]):
      f += 1
    if f == 3:
      break
  if f == 3:
    cnt += 1
print(cnt)

Fixed submission:
N = int(input())
S = input()

cnt = 0
for i in range(1000):
  c = str(i).zfill(3)
  if c[0] in S:
        index1 = S.index(c[0])
        if c[1] in S[index1+1:]:
            index2 = index1 + 1 + S[index1+1:].index(c[1])
            if c[2] in S[index2+1:]:
                cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
X, Y = list(map(int, input().split()))

def f(x, p):
    a = 1
    for i in range(1, x + 1):
        a *= i
        a %= p
    return a
def nCr(a, b, p):
    if a < 0 or b < 0:
        return 0
    elif a < b:
        return 0
    c = 1
    c *= f(a, p)
    c *= pow(f(b, p), p - 2, p)
    c *= pow(f(a - b, p), p - 2, p)
    return c % p

if (2*X-Y)%3 != 0 or (2*Y-X)%3 != 0 or Y > X*2 or X > Y*2:
  print(0)
else:
  m = (2*X-Y)//3
  n = (2*Y-X)//3
  print(nCr(m+n, n))


Fixed submission:
X, Y = list(map(int, input().split()))

def nCr(n, r, mod=10**9+7):
    n1, r = n+1, min(r, n-r)
    numer = denom = 1
    for i in range(1, r+1):
        numer = numer * (n1-i) % mod
        denom = denom * i % mod
    return numer * pow(denom, mod-2, mod) % mod

if (2*X-Y)%3 != 0 or (2*Y-X)%3 != 0 or Y > X*2 or X > Y*2:
  print(0)
else:
  m = (2*X-Y)//3
  n = (2*Y-X)//3
  print(nCr(m+n, n))
Buggy python submission (verdict: Runtime Error):
N = int(input())
D = list(map(int, input().strip().split()))
D.sort()
# print(D)
 
def calc(arr):
  if arr[0] != 0:
    return 0
  result = 1
  curCount = 1
  preCount = 1
  for i in range(1, len(arr)):
    if arr[i] == 0:
      return 0
    if arr[i] == arr[i-1]:
      curCount += 1
    elif arr[i] == arr[i-1] + 1:
      preCount = curCount
      curCount = 1
    else:
      return 0
    result = result * preCount
    if result > 998244353:
      result = result % 998244353
    #print(pre, curCount, preCount, result)
  return result%998244353
 
print(calc(D))


Fixed submission:
N = int(input())
half = 0
if N % 2 == 0:
  half = N//2-1
else:
  half = N//2
print(half)
Buggy python submission (verdict: Runtime Error):
A = int(input())
for i in 9:
  for j in 9:
    if i*j == A:
      print('Yes')
print('No')

Fixed submission:
A = int(input())
def calc(A):
  for i in range(1, 10):
    for j in range(1, 10):
      if i*j == A:
        return 'Yes'
  return 'No'
print(calc(A))
Buggy python submission (verdict: Runtime Error):
import sys
import math

for line in sys.stdin.readline():
    g = float(line.rstrip())
    ans = math.ceil(n/2)
    print(ans,end="")
    break

Fixed submission:
import sys
import math

for line in sys.stdin.readlines():
    n = float(line)
    ans = math.ceil(n / 2)
    print(ans, end="")
    break

Buggy python submission (verdict: Runtime Error):
import sys
import math

for line in sys.stdin.readline():
    g = float(line.rstrip())
    ans = math.ceil(n/2)
    print(ans,end="")
    break

Fixed submission:
import sys
import math

for line in sys.stdin.readlines():
    n = float(line)
    ans = math.ceil(n / 2)
    print(ans, end="")
    break

Buggy python submission (verdict: Runtime Error):
lines = [x.strip() for x in sys.stdin.readlines()]
def solve(lines):
    N = int(lines.pop(0))
    print(math.ceil(N/2))
solve(lines)

Fixed submission:
import sys,math
N = int(input())
print(math.ceil(N/2))

Buggy python submission (verdict: Runtime Error):
def solve(lines):
    N = int(lines.pop(0))
    print(math.ceil(N/2))
solve(lines)

Fixed submission:
import sys,math
N = int(input())
print(math.ceil(N/2))
Buggy python submission (verdict: Runtime Error):
    # -*- coding: utf-8 -*-
    import sys
    # ----------------------------------------------------------------
    # Use Solve Function
     
    def solve(lines):
        T,X = map(float, lines.pop(0).split(' '))
        print('{:.10f}'.format(T/X))
    #
    # main
    #
     
    # 1. use list instead of stdin
     
    # contents = '''\
    # 99 1\
    # '''
    # lines = contents.split('\n')
     
    # 2. use stdin
     
    lines = [x.strip() for x in sys.stdin.readlines()]
     
    #
    # solve !!
    #
    solve(lines)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    T,X = map(float, lines.pop(0).split(' '))
    print('{:.10f}'.format(T/X))
#
# main
#

# 1. use list instead of stdin

# contents = '''\
# 99 1\
# '''
# lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n,k = map(int, input().split(' '))
prices = []
for i in range(n):
    prices.append(int(input()))

sortedPrices = sorted(prices)


trees = []
for i in range(k):
    trees.append(sortedPrices.pop(0))

hdiff = 1000000000

while(True):
    hdiff = min( (trees[-1] - trees[0]), hdiff )
    trees.pop(0)
    if len(sortedPrices) == 0:
        break
    trees.append(sortedPrices.pop(0))

print(hdiff)

Fixed submission:
# -*- coding: utf-8 -*-
N, K = map(int, input().split(' '));
h = [int(input()) for i in range(N)]
h.sort()
print( min( h[i+K-1] - h[i] for i in range(N-K+1) ) )
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
n = int(input());
words = []

for i in range(n):
    words.append(input())

# 単語が重複していたらアウト
                            if (len(words) > len(set(words))):
    print('No')
    sys.exit(0)

before_word = words.pop(0)
while( len(words) > 0 ):
    after_word = words.pop(0)
    # しりとりになっていなかったらアウト
    if (before_word[-1] != after_word[0]):
        print('No')
        sys.exit(0)
    before_word = after_word
print('Yes')

Fixed submission:
# -*- coding: utf-8 -*-
import sys
n = int(input());
words = []

for i in range(n):
    words.append(input())

if (len(words) > len(set(words))):
    print('No')
    sys.exit(0)

before_word = words.pop(0)
while( len(words) > 0 ):
    after_word = words.pop(0)
    if (before_word[-1] != after_word[0]):
        print('No')
        sys.exit(0)
    before_word = after_word
print('Yes')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
H, W = map(int, input().split(' '));

board = []
flags = [ True for x in range(W)]
for i in range(H):
    line = list(input())
    if ( '#' in line ):
        board.append(line)
        flags = [ f and s == '.' for s,f in zip(line, flags) ]

j = 0
for i, flag in enumerate(flags):
    if flag:
        for b in board:
            b.pop(i-j)
            j += 1
for b in board:
    print(''.join(b))

Fixed submission:
# -*- coding: utf-8 -*-
import sys
H, W = map(int, input().split(' '));

board = []
flags = [ True for x in range(W)]
for i in range(H):
    line = list(input())
    if ( '#' in line ):
        board.append(line)
        flags = [ f and s == '.' for s,f in zip(line, flags) ]

j = 0
for b in board:
    for l,flag in zip(b,flags):
        if not flag:
            sys.stdout.write(l)
    print()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
H, W = map(int, input().split(' '));

board = []
flags = [ True for x in range(W)]
for i in range(H):
    line = list(input())
    if ( '#' in line ):
        board.append(line)
        flags = [ f and s == '.' for s,f in zip(line, flags) ]

for i, flag in enumerate(flags):
    if flag:
        for b in board:
            b.pop(i)
for b in board:
    print(''.join(b))

Fixed submission:
# -*- coding: utf-8 -*-
import sys
H, W = map(int, input().split(' '));

board = []
flags = [ True for x in range(W)]
for i in range(H):
    line = list(input())
    if ( '#' in line ):
        board.append(line)
        flags = [ f and s == '.' for s,f in zip(line, flags) ]

j = 0
for b in board:
    for l,flag in zip(b,flags):
        if not flag:
            sys.stdout.write(l)
    print()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys

S = input()
re = len(list(filter( lambda x: x == 'C', a[2:-1])))
if re == 1:
    print('AC')
else:
    print('WA')

Fixed submission:
# -*- coding: utf-8 -*-
import sys

S = input()
if S[0] != 'A':
    print('WA')
    sys.exit(0)
for l in S:
    if l in list('BDEFGHIJKLMNOPQRSTUVWXYZ'):
        print('WA')
        sys.exit(0)

re = len(list(filter( lambda x: x == 'C', S[2:-1])))
if re == 1:
    print('AC')
else:
    print('WA')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    l = list(map(int, lines.pop(0).split(' ')))
    l.sort()
    print(l[2] - l[0])

#
# main
#

# 1. use list instead of stdin
# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    S = lines.pop(0)
    T = lines.pop(0)
    for i in range(len(S)):
        S = S[-1] + S[:-1]
        if S == T:
            print('Yes')
            sys.exit(0)

    print('No')

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#abcdefg
#abcdegg\
#'''
#lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N = int(lines.pop(0))
    L = list(map(int, lines.pop(0).split(' ')))
    L.sort()
    print(L[-1] - L[0])

#
# main
#

# 1. use list instead of stdin

# contents = '''\
# 4
# 1 4 6 3\
# '''
# lines = contents.split('\n')

# 2. use stdin

# lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N = int(lines.pop(0))
    L = list(map(int, lines.pop(0).split(' ')))
    L.sort()
    print(L[-1] - L[0])

#
# main
#

# 1. use list instead of stdin

# contents = '''\
# 4
# 1 4 6 3\
# '''
# lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)
Buggy python submission (verdict: Runtime Error):
a# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    print(max( A+B, A-B, A*B ))

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#3 -4\
#'''
#lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    print(max( A+B, A-B, A*B ))

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#3 -4\
#'''
#lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    print(max( A+B, A-B, A*B ))

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#3 -4\
#'''
lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Fixed submission:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    print(max( A+B, A-B, A*B ))

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#3 -4\
#'''
#lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)