Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
if M % N == 0:
    print(M//N)
else:
    upper = math.ceil(M/N)
    for i in range(upper, 0, -1):
        if M % i == 0:
            break

    print(i)

Fixed submission:
import bisect
import math
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
if M % N == 0:
    print(M//N)
else:
    upper = math.ceil(M/N)
    factor = set()
    for i in range(1, int(M**0.5)+1):
        if M % i == 0:
            factor.add(i)
    
    factor1 = set()
    for i in factor:
        factor1.add(M//i)
    factor |= factor1
    
    factor = sorted(list(factor))
    print(factor[bisect.bisect_right(factor, upper)-1])

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
if M % N == 0:
    print(M//N)
else:
    upper = math.ceil(M/N)
    for i in range(upper, 0, -1):
        if M % i == 0:
            break

    print(i)

Fixed submission:
import bisect
import math
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
if M % N == 0:
    print(M//N)
else:
    upper = math.ceil(M/N)
    factor = set()
    for i in range(1, int(M**0.5)+1):
        if M % i == 0:
            factor.add(i)
    
    factor1 = set()
    for i in factor:
        factor1.add(M//i)
    factor |= factor1
    
    factor = sorted(list(factor))
    print(factor[bisect.bisect_right(factor, upper)-1])
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

n = int(input())
v = [int(_) for _ in input().split()]
oddcnt = [[0, i] for i in range(1, 10**5+1)]
evencnt = [[0, i] for i in range(1, 10**5+1)]

for i, j in enumerate(v):
    if i % 2 == 0:
        oddcnt[j][0] += 1
    else:
        evencnt[j][0] += 1

oddcnt = sorted(oddcnt, key=lambda x: (-x[0], x[1]))
evencnt = sorted(evencnt, key=lambda x: (-x[0], -x[1]))

if oddcnt[0][1] != evencnt[0][1]:
    print(n-oddcnt[0][0]-evencnt[0][0])
elif oddcnt[0][0] > evencnt[0][0]:
    print(n-oddcnt[0][0]-evencnt[1][0])
else:
    print(n-oddcnt[1][0]-evencnt[0][0])

Fixed submission:
import sys
input = sys.stdin.readline

n = int(input())
v = [int(_) for _ in input().split()]
oddcnt = [[0, i] for i in range(10**5+1)]
evencnt = [[0, i] for i in range(10**5+1)]

for i, j in enumerate(v):
    if i % 2 == 0:
        oddcnt[j][0] += 1
    else:
        evencnt[j][0] += 1

oddcnt = sorted(oddcnt, key=lambda x: (-x[0], x[1]))
evencnt = sorted(evencnt, key=lambda x: (-x[0], -x[1]))

if oddcnt[0][1] != evencnt[0][1]:
    print(n-oddcnt[0][0]-evencnt[0][0])
elif oddcnt[0][0] > evencnt[0][0]:
    print(n-oddcnt[0][0]-evencnt[1][0])
elif oddcnt[0][0] < evencnt[0][0]:
    print(n-oddcnt[1][0]-evencnt[0][0])
elif oddcnt[1][0] > evencnt[1][0]:
    print(n-oddcnt[1][0]-evencnt[0][0])
else:
    print(n-oddcnt[0][0]-evencnt[1][0])
Buggy python submission (verdict: Runtime Error):
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else
  print("AGC")

Fixed submission:
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")
Buggy python submission (verdict: Runtime Error):
S = input()
flag = True

if S[0] != 'A':
    flag = False

for i in range(2, len(S)-1):
    if S[i] == 'C':
        break
else:
    flag = False

if flag:
    copy = []
    for j in range(1, len(S)):
        if j == i:
            continue
        copy += S[j]

if not(''.join(copy).islower()):
    flag = False

print("AC" if flag else "WA")

Fixed submission:
S = input()
N = len(S)
flag = False

for i, charS in enumerate(S):
    if charS == "C" and (1 < i and i < N-1):
        flag = True
        numC = i
        break

if S[0] != "A":
    flag = False

if flag:
    text = [S[j] for j in range(N) if j != 0 and j != numC]
    text = ''.join(text)
    if not(text.islower()):
        flag = False

print("AC" if flag else "WA")

Buggy python submission (verdict: Runtime Error):
S = input()
flag = True

if S[0] != 'A':
    flag = False

for i in range(2, len(S)-1):
    if S[i] == 'C':
        break
else:
    flag = False

if flag:
    copy = []
    for j in range(1, len(S)):
        if j == i:
            continue
        copy += S[j]

if not(''.join(copy).islower()):
    flag = False
    
print("AC" if flag else "WA")

Fixed submission:
S = input()
N = len(S)
flag = False

for i, charS in enumerate(S):
    if charS == "C" and (1 < i and i < N-1):
        flag = True
        numC = i
        break

if S[0] != "A":
    flag = False

if flag:
    text = [S[j] for j in range(N) if j != 0 and j != numC]
    text = ''.join(text)
    if not(text.islower()):
        flag = False

print("AC" if flag else "WA")
Buggy python submission (verdict: Runtime Error):
N = input()
S = list(map(int, N))
print("Yes" if N % sum(S) == 0 else "No")

Fixed submission:
N = input()
S = list(map(int, N))
print("Yes" if int(N) % sum(S) == 0 else "No")
Buggy python submission (verdict: Runtime Error):
def rec(n):
    if n == 0:
        memo[n] = 0
        return memo[n]
    if memo[n] != -1:
        return memo[n]
    res = n
    pow6 = [1]
    pow9 = [1]
    for i in range(1, n):
        if 6 ** i > n:
            break
        pow6.append(6 ** i)
    
    for j in range(1, n):
        if 9 ** j > n:
            break
        pow9.append(9 ** j)
    L = set(pow6 + pow9)
    
    for k in L:
        res = min(res, rec(n - k)+1)
        
    memo[n] = res
    return memo[n]
    

N = int(input())
memo = [-1] * (N+1)
print(rec(N))

Fixed submission:
import sys
sys.setrecursionlimit(100000)

def rec(n):
    if n == 0:
        memo[n] = 0
        return memo[n]
    if memo[n] != -1:
        return memo[n]
    res = n
    pow6 = []
    pow9 = []
    for i in range(n):
        if 6 ** i > n:
            break
        pow6.append(6 ** i)
    
    for j in range(1, n):
        if 9 ** j > n:
            break
        pow9.append(9 ** j)
    L = set(pow6 + pow9)
    
    for k in L:
        res = min(res, rec(n - k)+1)
        
    memo[n] = res
    return memo[n]
    

N = int(input())
memo = [-1] * (N+1)
print(rec(N))
Buggy python submission (verdict: Runtime Error):
N = int(input())
X = [int(_) for _ in input().split()]
L = sorted(X)

small = L[N//2]
large = L[N//2+1]

for i in X:
    if i <= small:
        print(large)
    else:
        print(small)

Fixed submission:
N = int(input())
X = [int(_) for _ in input().split()]
L = sorted(X)

small = L[N//2-1]
large = L[N//2]

for i in X:
    if i <= small:
        print(large)
    else:
        print(small)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
print(min(A,B)+min(C+D))

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
print(min(A,B)+min(C,D))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = [input().split() for _ in range(N)]
res = len(set(S))
print("Three" if res == 3 else "Four")

Fixed submission:
N = int(input())
S = input().split()
res = len(set(S))
print("Three" if res == 3 else "Four")
Buggy python submission (verdict: Runtime Error):
S = input()
flag = False

for i in range(4):
    if S[i:i+2] == "AC"
        flag = True

print("Yes" if flag else "No")

Fixed submission:
S = input()
flag = False

for i in range(4):
    if S[i:i+2] == "AC":
        flag = True

print("Yes" if flag else "No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
D = [int(_) for _ in input().split()]
M = int(input())
T = [int(_) for _ in input().split()]

D = sorted(D)
T = sorted(T)
Dstart = 0
flag = True

for i in T:
    for j in D[Dstart:]:
        Dstart += 1
        if i == j:
            break
        elif i < j:
            flag = False
            break
        if Dstart == N:
            flag = False
    if not flag:
        break

print("YES" if flag else "NO")

Fixed submission:
N = int(input())
D = [int(_) for _ in input().split()]
M = int(input())
T = [int(_) for _ in input().split()]

D = sorted(D)
T = sorted(T)
Tindex = 0
flag = False

for i in D:
    if i == T[Tindex]:
        Tindex += 1
        if Tindex == M:
            flag = True
            break

print("YES" if flag else "NO")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
D = [int(_) for _ in input().split()]
M = int(input())
T = [int(_) for _ in input().split()]

D = sorted(D)
T = sorted(T)
Dstart = 0
flag = True

for i in T:
    for j in D[Dstart:]:
        Dstart += 1
        if i == j:
            break
        if Dstart == N:
            flag = False
    if not flag:
        break

print("YES" if flag else "NO")

Fixed submission:
N = int(input())
D = [int(_) for _ in input().split()]
M = int(input())
T = [int(_) for _ in input().split()]

D = sorted(D)
T = sorted(T)
Tindex = 0
flag = False

for i in D:
    if i == T[Tindex]:
        Tindex += 1
        if Tindex == M:
            flag = True
            break

print("YES" if flag else "NO")
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**6)
from operator import mul
from functools import reduce

def comb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under


def dfs(v, cur):
    color[v] = cur
    
    for next_v in Graph[v]:
        if color[next_v] != -1:
            if color[next_v] != cur:
                continue
            else:
                return False
        elif not dfs(next_v, 1-cur):
            return False
    return True
        


N, M = map(int, input().split())
AB = [[int(_) for _ in input().split()] for _ in range(M)]
Graph = [[] for _ in range(N)]
color = [-1]*N

for i in AB:
    Graph[i[0]-1].append(i[1]-1)
    Graph[i[1]-1].append(i[0]-1)

if dfs(0, 0):
  	black = color.count(0)
    white = N - black
    print(black*white-M)
else:
    print(comb(N, 2)-M)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
from operator import mul
from functools import reduce

def comb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under


def dfs(v, cur):
    color[v] = cur
    
    for next_v in Graph[v]:
        if color[next_v] != -1:
            if color[next_v] != cur:
                continue
            else:
                return False
        elif not dfs(next_v, 1-cur):
            return False
    return True
        


N, M = map(int, input().split())
AB = [[int(_) for _ in input().split()] for _ in range(M)]
Graph = [[] for _ in range(N)]
color = [-1]*N

for i in AB:
    Graph[i[0]-1].append(i[1]-1)
    Graph[i[1]-1].append(i[0]-1)

if dfs(0, 0):
    black = color.count(0)
    white = N - black
    print(black*white-M)
else:
    print(comb(N, 2)-M)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N = int(input())

for h, n in itertools.product(range(1, 3501), range(1, 3501)):
    if (4*n*h-N*(n+h)) == 0:
        continue
    elif N*h*n % (4*n*h-N*(n+h)) == 0 and N*h*n // (4*n*h-N*(n+h)) > 0:
        break

print(h, n, N*h*n // (4*n*h-N*(n+h)))

Fixed submission:
import itertools

N = int(input())

for h, n in itertools.product(range(1, 3501), range(1, 3501)):
    if (4*n*h-N*(n+h)) == 0:
        continue
    elif N*h*n % (4*n*h-N*(n+h)) == 0 and N*h*n // (4*n*h-N*(n+h)) > 0:
        break

print(h, n, N*h*n // (4*n*h-N*(n+h)))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for _ in range(N)]
S = set(A)
cnt = 0

for i in S:
    m = A.count(i)
    if m % 2 == 1:
        cnt += 1

print(cnt)

Fixed submission:
N = int(input())
A = [int(input()) for _ in range(N)]
S = sorted(A)
cnt = 0

for i in range(N):
    if i == 0:
        tmpnum = S[i]
        tmpcnt = 1
    else:
        if S[i] == tmpnum:
            tmpcnt += 1
        else:
            if tmpcnt % 2 != 0:
                cnt += 1
            tmpnum = S[i]
            tmpcnt = 1

if tmpcnt % 2 != 0:
    cnt += 1
            
print(cnt)
Buggy python submission (verdict: Runtime Error):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


N = int(input())
T = [int(input()) for _ in range(N)]
LCM = lcm(T[0], T[1])

for i in range(1, N-1):
    LCM = lcm(LCM, T[i+1])

print(LCM)

Fixed submission:
import sys
input = sys.stdin.readline


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


N = int(input())
T = [int(input()) for _ in range(N)]

if N == 1:
    print(T[0])

else:
    LCM = lcm(T[0], T[1])
    
    for i in range(1, N-1):
        LCM = lcm(LCM, T[i+1])
    
    print(LCM)

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

N = int(input())
T = [int(input()) for _ in range(N)]
ans = 1

for i in T:
    ans = (ans * i) // math.gcd(ans, i)

print(ans)

Fixed submission:
import sys
input = sys.stdin.readline


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


N = int(input())
T = [int(input()) for _ in range(N)]

if N == 1:
    print(T[0])

else:
    LCM = lcm(T[0], T[1])
    
    for i in range(1, N-1):
        LCM = lcm(LCM, T[i+1])
    
    print(LCM)

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

N = int(input())
T = [int(input()) for _ in range(N)]
lcm = 1

for i in T:
    lcm = lcm*i//math.gcd(lcm, i)

print(lcm)

Fixed submission:
import sys
input = sys.stdin.readline


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


N = int(input())
T = [int(input()) for _ in range(N)]

if N == 1:
    print(T[0])

else:
    LCM = lcm(T[0], T[1])
    
    for i in range(1, N-1):
        LCM = lcm(LCM, T[i+1])
    
    print(LCM)

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

N = int(input())
T = [int(input()) for _ in range(N)]
LCM = 1

for i in T:
    LCM = LCM*i//math.gcd(LCM, i)

print(LCM)

Fixed submission:
import sys
input = sys.stdin.readline


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


N = int(input())
T = [int(input()) for _ in range(N)]

if N == 1:
    print(T[0])

else:
    LCM = lcm(T[0], T[1])
    
    for i in range(1, N-1):
        LCM = lcm(LCM, T[i+1])
    
    print(LCM)

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

N = int(input())
T = [int(input()) for _ in range(N)]
LCM = 1

for i in T:
    LCM = LCM*i//math.gcd(LCM, i)

print(LCM)

Fixed submission:
import sys
input = sys.stdin.readline


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


N = int(input())
T = [int(input()) for _ in range(N)]

if N == 1:
    print(T[0])

else:
    LCM = lcm(T[0], T[1])
    
    for i in range(1, N-1):
        LCM = lcm(LCM, T[i+1])
    
    print(LCM)
Buggy python submission (verdict: Runtime Error):
from fractions import gcd

N, K = map(int, input().split())
A = [int(_) for _ in input().split()]
GCD = gcd(A[0], A[1])

for i in range(2, N):
    GCD = gcd(GCD, A[i])

if K <= max(A) and K % GCD == 0:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Fixed submission:
from fractions import gcd

N, K = map(int, input().split())
A = [int(_) for _ in input().split()]

if N == 1:
    print("POSSIBLE" if K == A[0] else "IMPOSSIBLE")
else:
    GCD = gcd(A[0], A[1])
    
    for i in range(2, N):
        GCD = gcd(GCD, A[i])
    
    if K <= max(A) and K % GCD == 0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a =[int(_) for _ in input().split()]
ans = 10**15
cardsum = sum(a)

for i in range(N-1):
    snuke = sum(a[:i+1])
    arai = cardsum - snuke
    diff = abs(snuke - arai)
    if diff < ans:
        ans = diff

print(ans)

Fixed submission:
N = int(input())
a =[int(_) for _ in input().split()]
ans = 10**15
cardsum = sum(a)
ruiseki = [0]

for i in range(N-1):
    ruiseki.append(ruiseki[i]+a[i])
    snuke = ruiseki[i+1]
    arai = cardsum - snuke
    diff = abs(snuke - arai)
    if diff < ans:
        ans = diff

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(_) for _ in input().split()]

if (n % 2) == 0:
    print(*a[n-1::-2], *a[::2])
else:
    print(*a[n-1::-2], *a[1::2])

Fixed submission:
n = int(input())
a = [int(_) for _ in input().split()]

if n%2==0:
    s = a[n-1::-2] + a[::2]
else:
    s = a[n-1::-2] + a[1::2]

print(*s)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(_) for _ in input().split()]

if n % 2 == 0:
    print(*a[n-1::-2], *a[::2])
else:
    print(*a[n-1::-2], *a[1::2])

Fixed submission:
n = int(input())
a = [int(_) for _ in input().split()]

if n%2==0:
    s = a[n-1::-2] + a[::2]
else:
    s = a[n-1::-2] + a[1::2]

print(*s)
Buggy python submission (verdict: Runtime Error):
def f(n):
    return(int(n/x)+1 if n >=0 else 0)
    
a, b, x = list(map(int, input().split()))
print(max(f(b)-f(a-1)),0)

Fixed submission:
a, b, x = map(int, input().split())
print(b//x - (a-1)//x)
Buggy python submission (verdict: Runtime Error):
from itertools import product

H, W = map(int, input().split())
L = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
S = [[str(_) for _ in input().split()] for _ in range(W)]

for i, j in product(range(H), range(W)):
    if S[i][j] == "snuke":
        break

res = L[i] + str(j+1)
print(res)

Fixed submission:
from itertools import product

H, W = map(int, input().split())
L = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
S = [[str(_) for _ in input().split()] for _ in range(H)]

for i, j in product(range(H), range(W)):
    if S[i][j] == "snuke":
        break

res = L[j] + str(i+1)
print(res)
Buggy python submission (verdict: Runtime Error):
s = input()
flag = False
for i in range(len(s)):
    if s[i] == "C":
        flag = True
        break


if flag:
    flag = False
    for j in range(len(s)-1, -1, -1):
        if s[j] == "F":
            flag = True
            break

print("Yes" if i < j and flag else "No")

Fixed submission:
s = input()
flag = False
for i in range(len(s)):
    if s[i] == "C":
        flag = True
        break


if flag:
    flag = False
    for j in range(len(s)-1, -1, -1):
        if s[j] == "F":
            flag = True
            break

print("Yes" if (flag and i < j) else "No")

Buggy python submission (verdict: Runtime Error):
s = input()
flag = False
for i in range(len(s)):
    if s[i] == "C":
        flag = True
        break


if flag:
    flag = False
    for j in range(len(s)-1, 0, -1):
        if s[j] == "F":
            flag = True
            break

print("Yes" if i < j and flag else "No")

Fixed submission:
s = input()
flag = False
for i in range(len(s)):
    if s[i] == "C":
        flag = True
        break


if flag:
    flag = False
    for j in range(len(s)-1, -1, -1):
        if s[j] == "F":
            flag = True
            break

print("Yes" if (flag and i < j) else "No")
Buggy python submission (verdict: Time Limit Exceeded):
N, A = map(int, input().split())
x = [int(_) for _ in input().split()]
M = 2500
dp = [[[0]*(N+1) for _ in range(M+1)] for _ in range(N+1)]
dp[0][0][0] = 1

for i in range(1, N+1):
    for j in range(M+1):
        for k in range(i+1):
            dp[i][j][k] = dp[i-1][j][k]
            if j >= x[i-1] and k > 0:
                dp[i][j][k] += dp[i-1][j-x[i-1]][k-1]

ans = 0
for i in range(1, N+1):
    ans += dp[N][A*i][i]

print(ans)

Fixed submission:
N, A = map(int, input().split())
x = [int(_) for _ in input().split()]
M = 2500
dp = [[[0]*(N+1) for _ in range(M+1)] for _ in range(N+1)]
dp[0][0][0] = 1

for i in range(1, N+1):
    for j in range(M+1):
        for k in range(i+1):
            dp[i][j][k] = dp[i-1][j][k]
            if j >= x[i-1] and k > 0:
                dp[i][j][k] += dp[i-1][j-x[i-1]][k-1]

ans = 0
for i in range(1, N+1):
    ans += dp[N][A*i][i]

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(input())

sum = 0

if n > 1:
    sum += 2 ** (n // 2)
else:
    sum += 1

if m > 1:
    sum += 2 ** (m // 2)
else:
    sum += 1

print(sum)


Fixed submission:
n, m = map(int, input().split())

count = 0
if n > 1:
  count += n * (n - 1) // 2
if m > 1:
  count += m * (m - 1) // 2
print(count)
Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())

count = 0
if y % 2 == 0:
	count = x * (y // 2)
elif y == 1
	count = 1
else:
	count = x * ((y + 1) // 2) - (x // 2)

print(count)

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

count = 0
if y == 1 or x == 1:
	count = 1
elif y % 2 == 0:
	count = x * (y // 2)
else:
	count = x * ((y + 1) // 2) - (x // 2)

print(count)
Buggy python submission (verdict: Runtime Error):

s = input()
t = input()

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

u = input()
if u == s:
    a -= 1
elif u == t:
    b -= 1
print(str(a) + ' ' + str(b))

Fixed submission:
color = input().split()

num = input().split()
a = int(num[0])
b = int(num[1])


u = input()
if u == color[0]:
    a -= 1
elif u == color[1]:
    b -= 1
print(str(a) + ' ' + str(b))

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

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

u = input()
if u == s:
    a -= 1
elif u == t:
    b -= 1
print(a +" " + b)

Fixed submission:
color = input().split()

num = input().split()
a = int(num[0])
b = int(num[1])


u = input()
if u == color[0]:
    a -= 1
elif u == color[1]:
    b -= 1
print(str(a) + ' ' + str(b))
Buggy python submission (verdict: Runtime Error):
in = list(map(int, input().split()))

print(in[2], in[0], in[1])

Fixed submission:
ina = list(map(int, input().split()))
 
print(ina[2], ina[0], ina[1])
Buggy python submission (verdict: Runtime Error):
a = [1,2,3]

a.remove(int(input()))
a.remoce(int(input()))

print(a[0])

Fixed submission:
a = int(input())
b = int(input())
c = [1, 2, 3]

c.remove(a)
c.remove(b)

print(c[0])
Buggy python submission (verdict: Runtime Error):
a = input()

if a[0] == a[1] and a[2] == a[3]: //AABB
	print("Yes")
elif a[0] == a[2] and a[1] == a[3]: //ABAB
	print("Yes")
elif a[0] == a[3] and a[1] == a[2]: //ABBA
	print("Yes")
else:
  	print("No")

Fixed submission:
a = input()

if a[0] == a[1] == a[2] == a[3]:
    print("No")
elif a[0] == a[1] and a[2] == a[3]:
    print("Yes")
elif a[0] == a[2] and a[1] == a[3]:
    print("Yes")
elif a[0] == a[3] and a[1] == a[2]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = input()

for i in range(0,3):
  if a[i] == a[i+1]:
    print("Bad")
	return

print("Good")

Fixed submission:
a = input()
flag = False

for i in range(0, 3):
    if a[i] == a[i+1]:
        print("Bad")
        flag = True
        break

if not flag:
    print("Good")
Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))

print(min(a[0]+ a[1], a[1] + a[2], a[2]+ a[0])

Fixed submission:
a = list(map(int, input().split()))
 
print(min(a[0]+ a[1], a[1] + a[2], a[2]+ a[0]))
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input())
cnt = 0
for i in range(2):
  cnt += max(A, B)
  A -= 1 if A == max(A, B) else B -= 1
  
print(cnt)

Fixed submission:
A, B = map(int, input().split())
cnt = 0
for i in range(2):
    cnt += max(A, B)
    if A == max(A, B):
        A -= 1
    else:
        B -= 1

print(cnt)