Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)

a = {}
for i in range(N):
	s_input = raw_input()
	if s_input in a:
		del a[s_input]
	else:
		a[s_input] = s_input

print(len(a))

Fixed submission:
N = raw_input()
N = int(N)

num10 = N/10
num1 = N - num10*10

if num10 == 9 or num1 == 9:
	print('Yes')
else:
	print('No')

Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)

a = {}
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		del a[s_input]
	else:
		a[s_input] += 1

print(len(a))

Fixed submission:
N = raw_input()
N = int(N)

num10 = N/10
num1 = N - num10*10

if num10 == 9 or num1 == 9:
	print('Yes')
else:
	print('No')

Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)

a = []
for i in range(N):
	s_input = input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)

print(len(a))

Fixed submission:
N = raw_input()
N = int(N)

num10 = N/10
num1 = N - num10*10

if num10 == 9 or num1 == 9:
	print('Yes')
else:
	print('No')

Buggy python submission (verdict: Runtime Error):
N = input()
N = int(N)

a = []
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)

print(len(a))

Fixed submission:
N = raw_input()
N = int(N)

num10 = N/10
num1 = N - num10*10

if num10 == 9 or num1 == 9:
	print('Yes')
else:
	print('No')

Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)

a = []
for i in range(N):
	s_input = raw_input()
	s_input = long(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)

print(len(a))

Fixed submission:
N = raw_input()
N = int(N)

num10 = N/10
num1 = N - num10*10

if num10 == 9 or num1 == 9:
	print('Yes')
else:
	print('No')

Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)

a = []
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)
	a.sort()

print(len(a))

Fixed submission:
N = raw_input()
N = int(N)

num10 = N/10
num1 = N - num10*10

if num10 == 9 or num1 == 9:
	print('Yes')
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)

a = {}
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		del a[s_input]
	else:
		a[s_input] += 1

print(len(a))

Fixed submission:
n=int(raw_input())
li={}
while n !=0:
    a = raw_input()
    if a in li:
        del li[a]
    else:
        li[a]=a
    n-=1
print(len(li))

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

a = []
for i in range(N):
	s_input = input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)

print(len(a))

Fixed submission:
n=int(raw_input())
li={}
while n !=0:
    a = raw_input()
    if a in li:
        del li[a]
    else:
        li[a]=a
    n-=1
print(len(li))

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

a = []
for i in range(N):
	a.sort()
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)

print(len(a))

Fixed submission:
n=int(raw_input())
li={}
while n !=0:
    a = raw_input()
    if a in li:
        del li[a]
    else:
        li[a]=a
    n-=1
print(len(li))

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

a = []
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	a.append(s_input)

a.sort()
result = 0
for i in range(N):
	num = a[i]
	cnt = a.count(num)
	if(cnt % 2 == 1):
		result += 1
	i += cnt

print(result)

Fixed submission:
n=int(raw_input())
li={}
while n !=0:
    a = raw_input()
    if a in li:
        del li[a]
    else:
        li[a]=a
    n-=1
print(len(li))

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

a = []
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)

print(len(a))

Fixed submission:
n=int(raw_input())
li={}
while n !=0:
    a = raw_input()
    if a in li:
        del li[a]
    else:
        li[a]=a
    n-=1
print(len(li))

Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)

a = []
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)
    a.sort()

print(len(a))

Fixed submission:
n=int(raw_input())
li={}
while n !=0:
    a = raw_input()
    if a in li:
        del li[a]
    else:
        li[a]=a
    n-=1
print(len(li))

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

a = []
for i in range(N):
	s_input = raw_input()
	s_input = int(s_input)
	if s_input in a:
		a.remove(s_input)
	else:
		a.append(s_input)

print(len(a))

Fixed submission:
n=int(raw_input())
li={}
while n !=0:
    a = raw_input()
    if a in li:
        del li[a]
    else:
        li[a]=a
    n-=1
print(len(li))
Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)
s = raw_input()
s = s.split(' ')
s = [float(x) for x in s]

n_list = [0 for i in range(3)]
for i in s:
	for t in range(3):
		i = i/2
		if (i - int(i) != 0):
			n_list[t] += 1
			break
		if(t == 2):
			n_list[t] += 1

if(n_list[0] <= n_list[2]):
	print('Yes')
else:
	print('No')

Fixed submission:
s = raw_input()
s = s.split(' ')
s = [int(x) for x in s]
n, m = s

print((n-1)*(m-1))

Buggy python submission (verdict: Runtime Error):
N = raw_input()
N = int(N)
s = raw_input()
s = s.split(' ')
s = [float(x) for x in s]

n_list = []
for i in s:
	for t in range(3):
		i = i/2
		if (i - int(i) != 0):
			n_list.append(t)
			break
		if(t == 2):
			n_list.append(t)

if(n_list.count(0) <= n_list.count(2)):
	print('Yes')
else:
	print('No')

Fixed submission:
s = raw_input()
s = s.split(' ')
s = [int(x) for x in s]
n, m = s

print((n-1)*(m-1))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N=int(input())
if N%4==0:
    print(int(3*N/4),int(3*N/4),int(3*N/4))
else:
    for h in range(1,3501):
        for n in range(1,3501):
            for w in range(1,3501):
                if N*(h*n+n*w+w*h)==4*h*n*w:
                    print(h,n,w)
                    sys.exit()

Fixed submission:
import sys
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*n*h-N*h-N*n >0:
            if (N*h*n)%(4*n*h-N*h-N*n)==0:
                w=int((N*h*n)/(4*n*h-N*h-N*n))
                print(h,n,w)
                sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
N=int(input())
for h in range(1,3501):
    for n in range(1,3501):
        for w in range(1,3501):
            if N==int((4*h*n*w)/((h*n+n*w+w*h))):
                print(h,n,w)
                sys.exit()

Fixed submission:
import sys
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*n*h-N*h-N*n >0:
            if (N*h*n)%(4*n*h-N*h-N*n)==0:
                w=int((N*h*n)/(4*n*h-N*h-N*n))
                print(h,n,w)
                sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
N=int(input())
for h in range(1,3501):
    for n in range(1,3501):
        for w in range(1,3501):
            if N==int((4*h*n*w)/((h*n+n*w+w*h))):
                print(h,n,w)
                sys.exit()

Fixed submission:
import sys
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*n*h-N*h-N*n >0:
            if (N*h*n)%(4*n*h-N*h-N*n)==0:
                w=int((N*h*n)/(4*n*h-N*h-N*n))
                print(h,n,w)
                sys.exit()
Buggy python submission (verdict: Runtime Error):
s=input()
if s[0]=="Y" and s[1]=="A" and s[2]=="K" and s[3]=="I":
    print("Yes")
else:
    print("No")


Fixed submission:
s=input()
try:
    if s[0]=="Y" and s[1]=="A" and s[2]=="K" and s[3]=="I":
      print("Yes")
    else:
        print("No")
except:
    print("No")
Buggy python submission (verdict: Runtime Error):
n,m,r=map(int,input().split())
r=list(map(int,input().split()))
cost=[[99999999 if i!=j else 0 for j in range(n)] for i in range(n)]
for _ in range(m):
    a,b,c=map(int,input().split())
    cost[a-1][b-1]=cost[b-1][a-1]=c
for k in range(n):
    for i in range(n):
        for j in range(n):
            cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
c=[[cost[y-1][x-1] for x in r] for y in r]
print(max(map(max,c)))

Fixed submission:
a=int(input())
print("Yes") if a//10==9 or a%10==9 else print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
for i in range(n):
    b=int(input())
    if b in a:
        a.remove(b)
    else:
        a.append(b)
print(len(a))

Fixed submission:
from collections import Counter
n=int(input())
a=[int(input()) for i in range(n)]
ans=0
for k,v in Counter(a).items():
    if v%2!=0:
        ans+=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
#A = [list(map(int,input().split())) for i in range(N)]
#print (A)
def bubble_sort(arr1,arr2,n):
    for i in range(n):
        for j in range(0,n-i-1):
            if arr1[j] > arr1[j+1]:
                arr1[j],arr1[j+1] = arr1[j+1],arr1[j]
                arr2[j],arr2[j+1] = arr2[j+1],arr2[j]





A = []
B = []
for i in range(N):
    tmp1,tmp2 = map(int,input().split())
    A.append(tmp1)
    B.append(tmp2)
bubble_sort(A,B,N)
base = A[-1]
addition = B[-1]

print(base + addition)


Fixed submission:
N = int(input())
#A = [list(map(int,input().split())) for i in range(N)]
#print (A)
def bubble_sort(arr1,arr2,n):
    for i in range(n):
        for j in range(0,n-i-1):
            if arr1[j] > arr1[j+1]:
                arr1[j],arr1[j+1] = arr1[j+1],arr1[j]
                arr2[j],arr2[j+1] = arr2[j+1],arr2[j]





A = []
B = []
max_key = 0
max_value = 0
for i in range(N):
    tmp1,tmp2 = map(int,input().split())
    A.append(tmp1)
    B.append(tmp2)
    if tmp1 > max_key:
        max_key = tmp1
        max_value = tmp2
print(max_value+max_key)
#bubble_sort(A,B,N)
#base = A[-1]
#addition = B[-1]


#print(base + addition)
Buggy python submission (verdict: Runtime Error):
import sys
N = int(input())
for i in range(1,3501):
    for j in range(i,3501):
        print(i,j)
        if 4*i*j-N*i-N*j > 0:
            if (N*i*j)%(4*i*j-N*i-N*j) == 0:
            print(i,j,int((N*i*j)/(4*i*j-N*i-N*j)))
            sys.exit()


Fixed submission:
import sys
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*n*h-N*h-N*n >0:
            if (N*h*n)%(4*n*h-N*h-N*n)==0:
                w=int((N*h*n)/(4*n*h-N*h-N*n))
                print(h,n,w)
                sys.exit()

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
w = 0
h = 0
n = 0
for i in range(1,3501):
    for j in range(i,3501):
        if 4*i*j-N*i-N*j <= 0:
            continue
        if (N*i*j)%(4*i*j-N*i-N*j) == 0:
            w = N*i*j//(4*i*j-N*i-N*j)
            h = i
            n = j
            break
print(h,n,w)


Fixed submission:
import sys
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*n*h-N*h-N*n >0:
            if (N*h*n)%(4*n*h-N*h-N*n)==0:
                w=int((N*h*n)/(4*n*h-N*h-N*n))
                print(h,n,w)
                sys.exit()
Buggy python submission (verdict: Runtime Error):
a,b = list(map(int,input().split()))
print(a*a-b)

Fixed submission:
a = int(input())
b = int(input())
print(a*a-b)
Buggy python submission (verdict: Runtime Error):


A,B,C,D,E,F = list(map(int, input().split()))
#x is a list which represents for the volumn of water
x = set()

#y is a list which represents for the volumn of sugar
y = set()

for i in range(F//C+1):
    for j in range((F-C*i)//D+1):
        #if i + j == 0:
            continue
        y.add( i * C + j * D)

for i in range(F//(100 * A)+1):
    for j in range((F-100*A*i)//(100*B)+1):
        if i + j == 0:
            continue
        x.add(i * A * 100 + j * B * 100)
#print(x)
#print(y)
ans_sweetwater = 1
ans_sugar = -1
#ans_density = -1
#density = E/(100+E)
#print("density: ",density)
for m in x:
    for n in y:
        #tmp_density = n/(m+n)
        if m + n <= F and m*E/100 >= n and ans_sugar/ans_sweetwater <= n/(m+n):
            ans_sweetwater =  m + n
            ans_sugar = n
            #ans_density = tmp_density
print(ans_sweetwater,ans_sugar)


Fixed submission:
A, B, C, D, E, F = map(int, input().split())
 
x = set()
y = set()
 
for i in range(F // (100 * A) + 1):
    for j in range((F - 100 * A * i) // (100 * B) + 1):
        if i + j == 0:
            continue
        x.add(A * i * 100 + B * j * 100)
 
for i in range(F // C + 1):
    for j in range((F - C * i) // D + 1):
        y.add(C * i + D * j)
 
ret_w = 1
ret_s = -1
 
for w in x:
    for s in y:
        if w + s <= F and w * E / 100 >= s and s / (w + s) >= ret_s / ret_w:
            ret_s = s
            ret_w = w + s
 
print(ret_w, ret_s)

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

A,B,C,D,E,F = list(map(int, input().split()))
#x is a list which represents for the volumn of water
x = list()

#y is a list which represents for the volumn of sugar
y = list()

for i in range(F//C+1):
    for j in range(F-C*i//D+1):
        if i == j == 0:
            continue
        tmp_y = i * C + j * D

        if tmp_y <= F:
            y.append(tmp_y)

for i in range(F//(100 * A)+1):
    for j in range(F-(100*A*i)//(100*B)+1):
        if i == j == 0:
            continue

        tmp_x = i * A * 100 + j * B * 100

        if tmp_x <= F:
            x.append(tmp_x)
#print(x)
#print(y)
ans_sweetwater = 0
ans_sugar = 0
ans_density = 0
density = E/(100+E)
#print("density: ",density)
for n in y:
    for m in x:
        tmp_density = n/(m+n)
        if m + n <= F and x/100*E >= y and ans_density <= tmp_density:
            ans_sweetwater =  m + n
            ans_sugar = n
            ans_density = tmp_density
print(ans_sweetwater,ans_sugar)


Fixed submission:
A, B, C, D, E, F = map(int, input().split())
 
x = set()
y = set()
 
for i in range(F // (100 * A) + 1):
    for j in range((F - 100 * A * i) // (100 * B) + 1):
        if i + j == 0:
            continue
        x.add(A * i * 100 + B * j * 100)
 
for i in range(F // C + 1):
    for j in range((F - C * i) // D + 1):
        y.add(C * i + D * j)
 
ret_w = 1
ret_s = -1
 
for w in x:
    for s in y:
        if w + s <= F and w * E / 100 >= s and s / (w + s) >= ret_s / ret_w:
            ret_s = s
            ret_w = w + s
 
print(ret_w, ret_s)
Buggy python submission (verdict: Runtime Error):
n = int(input())

def solve(n):
	for x in range(1, 3501):
		nx = n * x
		for y in range(x, 3501):
			# 4/n = 1/x + 1/y + 1/z
			# 1/z = 4/n - 1/x - 1/y
			# z = 1/(4/n - 1/x - 1/y)
			# z = nxy/(4xy - ny - nx)
			nxy = nx * y
			den = 4*x*y - n*y -nx
			if (nxy % den == 0 and nxy//den > 0):
				print(x, y, nxy//den)
				return

solve(n)		


Fixed submission:
n = int(input())

def solve(n):
	for x in range(1, 3501):
		nx = n * x
		for y in range(x, 3501):
			# 4/n = 1/x + 1/y + 1/z
			# 1/z = 4/n - 1/x - 1/y
			# z = 1/(4/n - 1/x - 1/y)
			# z = nxy/(4xy - ny - nx)
			nxy = nx * y
			den = 4*x*y - n*y -nx
			if (den > 0 and nxy % den == 0 and nxy//den > 0):
				print(x, y, nxy//den)
				return

solve(n)
Buggy python submission (verdict: Runtime Error):
def solve(K, ABs):
    if not ABs: return 0
    ansK = sum(b for a, b in ABs if (K | a) == K)
    pool = []
    for i in range(30, -1, -1):
        if (K & (1<<i)):
            pool.append(i)
    for p in pool:
        v = 1 << p
        KK = (K >> p) << p
        KKK = (K >> p)
        t = sum(b for a, b in ABs if (not(a & v) and (a | KK) >> p == KKK)
        if t > ansK: ansK = t
    return ansK
   

N, K = map(int, input().split())
ABs = []
for i in range(N):
    a, b = map(int, input().split())
    if a > K: continue
    ABs.append([a, b])

print(solve(K, ABs))

Fixed submission:
def solve(K, ABs):
    if not ABs: return 0
    ansK = sum(b for a, b in ABs if (K | a) == K)
    pool = []
    for i in range(30, -1, -1):
        if (K & (1<<i)):
            pool.append(i)
    for p in pool:
        v = 1 << p
        KK = (K >> p) << p
        KKK = (K >> p)
        t = sum(b for a, b in ABs if (not(a & v) and (a | KK) >> p == KKK))
        if t > ansK: ansK = t
    return ansK
   

N, K = map(int, input().split())
ABs = []
for i in range(N):
    a, b = map(int, input().split())
    if a > K: continue
    ABs.append([a, b])

print(solve(K, ABs))

Buggy python submission (verdict: Runtime Error):
def solve(K, ABs):
    if not ABs return 0
    ansK = sum(b for a, b in ABs if (K | a) == K)
    pool = []
    for i in range(30, -1, -1):
        if (K & (1<<i)):
            pool.append(i)
        else:
            if pool:
                break
    for p in pool:
        v = 1 << p
        t = sum(b for a, b in ABs if not(a & v))
        if t > ansK: ansK = t
    return ansK
   

N, K = map(int, input().split())
ABs = []
for i in range(N):
    a, b = map(int, input().split())
    if a > K: continue
    ABs.append([a, b])

print(solve(K, ABs))

Fixed submission:
def solve(K, ABs):
    if not ABs: return 0
    ansK = sum(b for a, b in ABs if (K | a) == K)
    pool = []
    for i in range(30, -1, -1):
        if (K & (1<<i)):
            pool.append(i)
    for p in pool:
        v = 1 << p
        KK = (K >> p) << p
        KKK = (K >> p)
        t = sum(b for a, b in ABs if (not(a & v) and (a | KK) >> p == KKK))
        if t > ansK: ansK = t
    return ansK
   

N, K = map(int, input().split())
ABs = []
for i in range(N):
    a, b = map(int, input().split())
    if a > K: continue
    ABs.append([a, b])

print(solve(K, ABs))
Buggy python submission (verdict: Runtime Error):
if S.startswith("YAKI"):
  return "Yes"
else:
  return "No"

Fixed submission:
name = input()
if name.startswith("YAKI"):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S

Fixed submission:
name = input()
if name.startswith("YAKI"):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
t1 = input()
t2 = t1[:4] + " " + t2[4:] + "\n"
print(t2)

Fixed submission:
t1 = input()
t2 = t1[:4] + " " + t1[4:] 
print(t2)
Buggy python submission (verdict: Runtime Error):
s=str(input())
if s[:4]==YAKI:
    print("yes")
else:
    print("no")


Fixed submission:
s=str(input())
if s[:4]=="YAKI":
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
a = list(input())
b = ""
for i in range(4):
    b += a[i] 
if b == "YAKI":
    print('Yes')
else:
    print('No')

Fixed submission:
N = list(input())
m = ""
if len(N)  > 3:
    m = N[0] + N[1] + N[2] + N[3]
if m == 'YAKI':
        print('Yes')
else:
        print('No')
Buggy python submission (verdict: Runtime Error):
#! /bin/python
# coding:utf-8

N = input()
A = map(int, raw_input().split())
s = set()
dep = []

for i in A:
	if i in s:
		dep.append(i)
	s.add(i)

dep.sort()
dep.reverse()

if (len(dep) < 2):
	print 0
else:
	print dep[0] * dep[1]

Fixed submission:
#! /bin/python
# coding:utf-8

(x, a, b) = map(int, raw_input().split())

if (abs(x - a) < abs(x - b)):
	print "A"
else:
	print "B"

Buggy python submission (verdict: Runtime Error):
#! /bin/python
# coding:utf-8

N = input()
A = map(int, raw_input().split())
s = set()
dep = []

for i in A:
	if i in s:
		dep.append(i)
	s.add(i)

dep.sort()
dep.reverse()

if (len(dep) < 2):
	print 0
else:
	print dep[0] * dep[1]

Fixed submission:
#! /bin/python
# coding:utf-8

(x, a, b) = map(int, raw_input().split())

if (abs(x - a) < abs(x - b)):
	print "A"
else:
	print "B"
Buggy python submission (verdict: Runtime Error):
s=input()
if(len(s)>=4)
if(s[:4]=="YAKI"): print("YES")
else : print("NO")

Fixed submission:
s=input()
if(len(s)>=4) :
	if(s[:4]=="YAKI"): 
		print("Yes")
	else : print("No")
else : print("No")
Buggy python submission (verdict: Runtime Error):
N, x = list(map(int, input().split()))
a = list(map(int, input().split()))
min_index = a.index(min(a))
index_list = list(range(min_index,N)) + list(range(min_index))
cost = a.copy()
c_count = [0]*N
for i in range(1,N):
    if cost[index_list[i]] > (cost[index_list[i-1]]+x):
        cost[index_list[i]] = cost[index_list[i-1]]+x
        c_count[index_list[i]] = c_count[index_list[i-1]]+1

print(sum(cost) - sum(c_count)*x + max(c_count)*x  )


Fixed submission:
A, B, C = list(map(int, input().split()))
if (A*B*C)%2 == 0:
    print('0')
else:
    print('%s' % str(min(min(A*B, B*C),C*A)) )
Buggy python submission (verdict: Runtime Error):
N,L = list(map(int, input().split()))
a = [input() for i in range(N)]

b = []
for i in range(N):
    n = 0
    for j in range(L):
        n = (n*100) + ord( a[i][j])-96
    b.append(n)
ind = b.index(max(b))
print('%s' % str(a[ind]))


Fixed submission:
A,B,C = list(map(int, input().split()))
if A*B*C ==  175:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import division, print_function
import sys


def main():
    h, w = map(int, sys.stdin.readline().strip().split(" "))
    aa = ""
    for _ in range(h):
        aa += sys.stdin.readline().strip()
    d = {}
    for c in aa:
        if c in d:
            d[c] += 1
        else:
            d[c] = 1

    # print(d)
    fours = 0
    evens = 0
    odds = 0

    for c, count in d.items():
        fours += count // 4
        evens += (count % 4) // 2
        odds += count % 2

    # print(fours, evens, odds)
    if h % 2 == 0 and w % 2 == 0:
        print("Yes" if odds == 0 and evens == 0 else "No")
    elif h % 2 == 0 and w % 2 == 1:
        print("Yes" if odds == 0 and evens * 2 == h else "No")
    elif h % 2 == 1 and w % 2 == 0:
        print("Yes" if odds == 0 and evens * 2 == w else "No")
    else:
        print("Yes" if odds == 1 and evens * 2 == w + h - 2 else "No")


if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import division, print_function
import sys


def main():
    print("Yes" if sys.stdin.readline().strip().startswith("YAKI") else "No")


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
from sys import stdin                                                                                                                                                
from sys import stdout

A,B,C = stdin.readline().split()

if A%2 == 0 or B%2 == 0 or C%2 == 0 : 
        print 0
        exit()

AB = int(A) * int(B)
BC = int(C) * int(B)
AC = int(A) * int(C)
ABC = AB * int(C)

area = (AB,BC,AC).sort().reverse()[0]
print area

Fixed submission:
from sys import stdin
from sys import stdout

A,B,C = stdin.readline().split()

if int(A)%2 == 0 or int(B)%2 == 0 or int(C)%2 == 0 :
        print 0
        exit()

AB = int(A) * int(B)
BC = int(C) * int(B)
AC = int(A) * int(C)
ABC = AB * int(C)

area = sorted([AB,BC,AC])[0]                                                                                                                                         
print area
Buggy python submission (verdict: Runtime Error):
import sys 

N = sys.readline()
K = sys.readline()
X = sys.readline()
Y = sys.readline()

#X* K + Y * (N-K)
# if N > K

#X * K
# if N < K

if N > K : 
        print X* K + Y *(N-K)
else:
        print X*K             

Fixed submission:
import sys 

N = int(sys.stdin.readline())
K = int(sys.stdin.readline())
X = int(sys.stdin.readline())
Y = int(sys.stdin.readline())

#X* K + Y * (N-K)
# if N > K

#X * K
# if N < K

if N > K : 
    print X* K + Y *(N-K)
else:
    print X*N
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 23 19:10:57 2017

@author: taichiNakamura
"""

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

favorite = 0
for i,ai in enumerate(a):
    if a[ai-1] == (i+1):
        favorite += 1

print(favorite//2)


Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 23 19:10:57 2017

@author: taichiNakamura
"""

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

a = list(map(int, a))

favorite = 0
for i,ai in enumerate(a):
    if a[ai-1] == (i+1):
        favorite += 1

print(favorite//2)