Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
A=[[]]
for i in range(N):
    A.append(list(map(int,input().split())))
A.sort(key=lambda x:(x[0],x[1]))
C=[A[0][0]*A[0][1]]
D=A[0][1]
for i in range(N-1):
    C.append(C[i]+A[i+1][0]*A[i+1][1])
    D.append(D[i]+A[i+1][1])
for i in range(N):
    if M<D[i]:
        print(C[i]-(D[i]-M)*A[i][0])

Fixed submission:
N,M=map(int,input().split())
A=[]
for i in range(N):
    A.append(list(map(int,input().split())))
A.sort(key=lambda x:(x[0],x[1]))
C=[A[0][0]*A[0][1]]
D=[A[0][1]]
for i in range(N-1):
    C.append(C[i]+A[i+1][0]*A[i+1][1])
    D.append(D[i]+A[i+1][1])
for i in range(N):
    if M<D[i]:
        print(C[i]-(D[i]-M)*A[i][0])
        break
if M==D[N-1]:
    print(C[N-1])

Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int,input().split())
A,B=[],[]
for i in range(N):
    x,y=map(int,input().split())
    A.append(x)
    B.append(y)
k=M
c=0
while k>0:
    a=min(A)
    b=B[A.index(a)]
    k=k-b
    if k>0:
        c=c+a*b
    else:
        c=c+a*(k+b)
    A.remove(a)
    B.remove(b)
print(c)

Fixed submission:
N,M=map(int,input().split())
A=[]
for i in range(N):
    A.append(list(map(int,input().split())))
A.sort(key=lambda x:(x[0],x[1]))
C=[A[0][0]*A[0][1]]
D=[A[0][1]]
for i in range(N-1):
    C.append(C[i]+A[i+1][0]*A[i+1][1])
    D.append(D[i]+A[i+1][1])
for i in range(N):
    if M<D[i]:
        print(C[i]-(D[i]-M)*A[i][0])
        break
if M==D[N-1]:
    print(C[N-1])
Buggy python submission (verdict: Runtime Error):
import math
A,B,K=map(int,input().split())
d=[]
for i in range(1,max(A,B)+1):
    if A%i==0 and B%i==0:
        d.append(i)
print(d[len(d)-K])

Fixed submission:
A,B,C=map(int,input().split())
if B>A*C:
    print(C)
else:
    print(B//A)

Buggy python submission (verdict: Runtime Error):
import math
A,B,K=map(int,input().split())
d=[]
if math.gcd(A,B)==1:
    d.append(1)
else:
    for i in range(2,math.gcd(A,B)+1):
        if A%i==0 and B%i==0:
            d.append(i)
print(d[len(d)-K])

Fixed submission:
A,B,C=map(int,input().split())
if B>A*C:
    print(C)
else:
    print(B//A)
Buggy python submission (verdict: Runtime Error):
import math
A,B,K=map(int,input().split())
d=[]
if math.gcd(A,B)==1:
    d.append(1)
else:
    for i in range(2,math.gcd(A,B)+1):
        if A%i==0 and B%i==0:
            d.append(i)
print(d[len(d)-K])

Fixed submission:
import math
A,B,K=map(int,input().split())
d=[]
for i in range(1,min(A,B)+1):
    if A%i==0 and B%i==0:
        d.append(i)
print(d[len(d)-K])

Buggy python submission (verdict: Runtime Error):
import math
A,B,K=map(int,input().split())
d=[]
if math.gcd(A,B)==1:
    d.append(1)
else:
    for i in range(2,math.gcd(A,B)+1):
        if A%i==0 and B%i==0:
            d.append(i)
print(d[len(d)-K])

Fixed submission:
import math
A,B,K=map(int,input().split())
d=[]
for i in range(1,min(A,B)+1):
    if A%i==0 and B%i==0:
        d.append(i)
print(d[len(d)-K])

Buggy python submission (verdict: Runtime Error):
import math
A,B,K=map(int,input().split())
d=[]
if A==1 or B==1:
    d.append(1)
else:
    for i in range(2,math.gcd(A,B)+1):
        if A%i==0 and B%i==0:
            d.append(i)
print(d[len(d)-K])

Fixed submission:
import math
A,B,K=map(int,input().split())
d=[]
for i in range(1,min(A,B)+1):
    if A%i==0 and B%i==0:
        d.append(i)
print(d[len(d)-K])
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
a = [[1 for _ in range(M)]+[0 for _ in range(M)] for _ in range(N)]
for i in range(1,N+1):
    B=list(map(int,input().split()))
    for m in range(1,B[0]+1):
        A[i][B[m]]=A[i-1][B[m]]
a=sum(A[N])
print(int(a))

Fixed submission:
import numpy as np
N,M=map(int,input().split())
A=np.zeros((N+1,M+1))
A[0]=np.ones(M+1)
for i in range(1,N+1):
    B=list(map(int,input().split()))
    for m in range(1,B[0]+1):
        A[i][B[m]]=A[i-1][B[m]]
a=sum(A[N])
print(int(a))
Buggy python submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
def u(x,y):
    if x%y==0:
        return y
    else:
        return u(y,x%y)
b=list(range(N-1))
for i in range(1,N):
    b[i]=u(b[i-1],a[i])
print(int(b[N-2]))

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
def u(x,y):
    if x%y==0:
        return y
    else:
        return u(y,x%y)
b=list(range(N))
b[0]=a[0]
for i in range(1,N):
    b[i]=u(b[i-1],a[i])
print(int(b[N-1]))

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
def u(x,y):
    if x%y==0:
        return y
    else:
        return u(y,x&y)
b=list(range(N-1))
for i in range(1,N):
    b[i-1]=u(a[i-1],a[i])
print(int(b[N-2]))

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
def u(x,y):
    if x%y==0:
        return y
    else:
        return u(y,x%y)
b=list(range(N))
b[0]=a[0]
for i in range(1,N):
    b[i]=u(b[i-1],a[i])
print(int(b[N-1]))

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)
N=input()
M=list(map(int,input().split()))
print(gcd(*M))

Fixed submission:
N=int(input())
a=list(map(int,input().split()))
def u(x,y):
    if x%y==0:
        return y
    else:
        return u(y,x%y)
b=list(range(N))
b[0]=a[0]
for i in range(1,N):
    b[i]=u(b[i-1],a[i])
print(int(b[N-1]))
Buggy python submission (verdict: Runtime Error):
N,M=map(int,input().split())
X=sorted(list(map(int,input().split())))
if N<M:
    D=sorted([X[i+1]-X[i] for i in range(M-1)])
    print(sum(D[i] for i in range(M-N)))
else:
    print(0)

Fixed submission:
T,X=map(int,input().split())
print(T/X)
Buggy python submission (verdict: Time Limit Exceeded):
N,X=map(int,input().split())
def f(n):
    if n==0:
        return [1]
    else:
        return [0]+f(n-1)+[1]+f(n-1)+[0]
print(sum(f(N)[i] for i in range(X)))

Fixed submission:
N,X=map(int,input().split())
H=[1]
P=[1]

for i in range(N):
    H.append(H[i]*2+3)
    P.append(P[i]*2+1)

def f(n,x):
    if n==0:
        return  1
    else:
        if x==1:
            return 0
        elif x<2+H[n-1]:
            return f(n-1,x-1)
        elif x==2+H[n-1]:
            return P[n-1]+1
        elif x<H[n]:
            return P[n-1]+f(n-1,x-H[n-1]-2)+1
        elif x==H[n]:
            return P[n]
print(f(N,X))
Buggy python submission (verdict: Runtime Error):
S=input()
print(min(abs(int(S[i:i+3])-753) for i in range(len(S)-2)))

Fixed submission:
X=int(input())
if X==3 or X==5 or X==7:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
S=input()
print(min([abs(int(S[i:i+3])-753) for i in range(len(S)-2)]))

Fixed submission:
X=int(input())
if X==3 or X==5 or X==7:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
PY=[list(map(int,input().split()))+[0] for _ in range(M)]
sort_PY=sorted(PY,key=lambda x:x[1])
c={}
for i in range(M):
    p=sort_PY[i][0]
    if(p in c):
        c[p]+=1
    else:
        c[p]=1
    sort_PY[i][2]=c[p]
for p,y,z in PY:
    print(str(p).zfill(6)+str(z).zfill(6))

Fixed submission:
X,Y=map(int,input().split())
print(X+int(Y/2))
Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int,input().split())
PY=[]
for i in range(M):
    PY.append(list(map(int,input().split()))+[i+1])
    PY.sort(key=lambda x:(x[0],x[1]))
id=[]
l=[]
while len(PY)>0:
    p=PY[0][0]
    i=0
    while PY[i][0]==p:
        i+=1
        id.append('0'*(6-len(str(p)))+str(p)+'0'*(6-len(str(i)))+str(i))
        l.append(PY[i-1][2])
        if i+1>len(PY):
            break
    del PY[:i]
for i in range(1,M+1):
    print(id[l.index(i)])

Fixed submission:
N,M = map(int,input().split())
PY=[list(map(int,input().split()))+[0] for _ in range(M)]
sort_PY=sorted(PY,key=lambda x:x[1])
c={}
for i in range(M):
    p=sort_PY[i][0]
    if(p in c):
        c[p]+=1
    else:
        c[p]=1
    sort_PY[i][2]=c[p]
for p,y,z in PY:
    print(str(p).zfill(6)+str(z).zfill(6))
Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
x=list(map(int,input().split()))
x=[abs(X-c) for c in x]
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)
D=gcd(*x)
print(D)

Fixed submission:
A,B=map(int,input().split())
if A%2==1 and B%2==1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import math

def input_number():
    return int(input())

def input_1line_list(number_of_input):
    return [input() for i in range(number_of_input)]

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

# def print_unique_length(input_list):
#     print(len(set(input_list)))

def main():
    a, b, n = input_1line()
    ans = 0
    for i in range(n+1):
        ans = max(ans, math.floor(a*i/b) - a*math.floor(i/b))
    print(ans)

if __name__ == '__main__':
    main()

Fixed submission:
import math

def input_number():
    return int(input())

def input_1line_list(number_of_input):
    return [input() for i in range(number_of_input)]

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

# def print_unique_length(input_list):
#     print(len(set(input_list)))

def f(a, b, x):
    return (a*(x%b))//b 

def main():
    a, b, n = input_1line()
    x = min(b-1, n)
    ans = f(a, b, x)
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    N = int(input())
    s = input()
    ans = 0
    for i in range(1000):
        t = str(i).zfill(3)
        t_index = 0 
        for s_index in range(N):
            if s[s_index] == t[t_index]:
                t_index += 1
                if t_index == 3:
                    break
        if t_index == 3:
            ans += 1
    print(ans)
solve()

Fixed submission:
def solve():
    ans = 1
    N = int(input())
    s = input()
    ans = 0
    for i in range(1000):
    	t = str(i).zfill(3)
    	t_index = 0 
    	for s_index in range(N):
    		if s[s_index] == t[t_index]:
    			t_index += 1
    			if t_index == 3:
    				break
    	if t_index == 3:
    		ans += 1
    print(ans)
solve()
Buggy python submission (verdict: Runtime Error):
N = int(intput())
print(N * (N-1) // 2)


Fixed submission:
S = input()
T = input()
cnt = 0

for i in range(3):
    if S[i] == T[i]:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
N = int(intput())
print(N * (N-1) // 2)


Fixed submission:
N = int(input())
print(N * (N-1) // 2)

Buggy python submission (verdict: Runtime Error):
N = int(intput())
print(N*(N-1)//2)

Fixed submission:
N = int(input())
print(N * (N-1) // 2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

sum_reverse = 0
for i in range(1,n):
	sum_reverse += 1/float(a[i])

print(1/sum_reverse)

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

sum_reverse = 0
for i in range(n):
	sum_reverse += 1/float(a[i])

print(1/sum_reverse)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

sum_reverse = 0
for i in range(1,n):
	sum_reverse += 1/a[i]

print(1/sum_reverse)

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

sum_reverse = 0
for i in range(n):
	sum_reverse += 1/float(a[i])

print(1/sum_reverse)
Buggy python submission (verdict: Runtime Error):
s=input()
random.sample(s, k)
max(k)
print(k)

Fixed submission:
cnt=0
mat=test=''
for c in input():
  mat+=c
  if mat!=test:
    cnt+=1
    mat,test='',mat
print(cnt)
Buggy python submission (verdict: Runtime Error):
k, x = map(int,input().split())
print(sorted(x, reverse=True))


Fixed submission:
a, b = map(int,input().split())
print(max(a+b, a-b, a*b))
Buggy python submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(n):
  if len(i) % 2 == 1:
    count += 1
    
print(count)


Fixed submission:
a, b, c = map(int,input().split())
print(max(0, (c - (a - b))))

Buggy python submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(n):
  if len(i) % 2 == 1:
    count += 1
    
print(count)

Fixed submission:
a, b, c = map(int,input().split())
print(max(0, (c - (a - b))))
Buggy python submission (verdict: Runtime Error):
n = int(input())
count = 0
for i in range(n):
  if len(i) % 2 == 1:
    count += 1
    
print(count)


Fixed submission:
n = int(input())
count = 0
for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
    count += 1
    
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int,input().split()))	
bool 
for i in range (1, N):
  if H[i-1] == H[i] or H[i] == H[i-1] + 1:
    True
  elif H[i+1] == H[i] - 1:
    H[i] -= 1
    if H[i-1] > H[i]:
      False
if (True):
  print('Yes' )
else:
  print('No')
  
    
    
  


Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
lis[0]-=1

for i in range(n-1):
  if lis[i] < lis[i+1]:
    lis[i+1] -= 1
  elif lis[i] > lis[i+1]:
    print("No")
    exit()
print("Yes")

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int,input().split()))	
bool 
for i in range (1, N+1):
  if H[i-1] == H[i] or H[i] == H[i-1] + 1:
    True
  elif H[i+1] == H[i] - 1:
    H[i] -= 1
    if H[i-1] > H[i]:
      False
if (True):
  print('Yes' )
else:
  print('No')
  
    
    
  


Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
lis[0]-=1

for i in range(n-1):
  if lis[i] < lis[i+1]:
    lis[i+1] -= 1
  elif lis[i] > lis[i+1]:
    print("No")
    exit()
print("Yes")

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int,input().split()))	
bool 
for i in range (1, N+1):
  if H[i-1] == H[i] or H[i] == H[i-1] + 1:
    True
  elif H[i+1] == H[i] - 1:
    H[i] -= 1
    if H[i-1] > H[i]:
      False
if (True):
  print('Yes' )
if (False):
  print('No')
  
    
    
  

Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
lis[0]-=1

for i in range(n-1):
  if lis[i] < lis[i+1]:
    lis[i+1] -= 1
  elif lis[i] > lis[i+1]:
    print("No")
    exit()
print("Yes")
Buggy python submission (verdict: Runtime Error):
n = int(input())
p = [input() for i in range(n)]
print(sum(p) - int(max(p)/2))


Fixed submission:
l = [int(input()) for _ in range(int(input()))]
print(sum(l) - max(l)//2)

Buggy python submission (verdict: Runtime Error):
n = int(input())
p = [input() for i in range(n)]
print(sum(p) - max(p)/2)


Fixed submission:
l = [int(input()) for _ in range(int(input()))]
print(sum(l) - max(l)//2)
Buggy python submission (verdict: Runtime Error):
A, B, C = sorted(map(input().split()))
print(10*C+A+B)

Fixed submission:
A, B, C = sorted(map(int, input().split()))
print(10*C+A+B)
Buggy python submission (verdict: Runtime Error):
*a = map(int, input().split())
print(max(a)- min(a))

Fixed submission:
*a, = map(int, input().split())
print(max(a)- min(a))
Buggy python submission (verdict: Runtime Error):
a, b, c, d = [int(input()), for _ in range(4)]
print(min(a,b)+min(c,d))

Fixed submission:
a,b,c,d=[int(input()) for _ in range(4)]
print(min(a,b)+min(c,d))
Buggy python submission (verdict: Runtime Error):
n = [ input() for _ in range( int( input() ) )]
m = [ input() for = in range( int( input() ) )]
l = list( set(n) )
print( max( 0, max( n.count(l[i]) - m.count(l[i]) for i in range( len(l) ) ) ) )
        
                              

Fixed submission:
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Buggy python submission (verdict: Runtime Error):
n = [ input() for _ in range ( int ( input () ) )]
m = [ input() for _ in range ( int ( input () ) )]
l = list( set (n) )
print( max(0, max(n.count( l[i] ) - (m.count( l[i] ) for i in range(len(l))))))

Fixed submission:
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split)
seta = set()
setb = set()
for i in range(M):
    a, b, =map(int, input().split)
    if a == 1: setb.add(b)
    if b == N: seta.add(a)
if len(seta&setb) == 0: print("IMPOSSIBLE")
else:   print("POSSIBLE")


Fixed submission:
N, M = map(int, input().split())
seta = set()
setb = set()
for i in range(M):
    a, b, =map(int, input().split())
    if a == 1: setb.add(b)
    if b == N: seta.add(a)
if len(seta&setb) == 0: print("IMPOSSIBLE")
else:   print("POSSIBLE")

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split)
seta = set()
setb = set()
for i in range(M):
    a, b, =map(int, input().split)
    if a == 1: setb = set.add(b)
    if b == N: seta = set.add(a)
if len(seta&setb) == 0: print("IMPOSSIBLE")
else:   print("POSSIBLE")


Fixed submission:
N, M = map(int, input().split())
seta = set()
setb = set()
for i in range(M):
    a, b, =map(int, input().split())
    if a == 1: setb.add(b)
    if b == N: seta.add(a)
if len(seta&setb) == 0: print("IMPOSSIBLE")
else:   print("POSSIBLE")
Buggy python submission (verdict: Runtime Error):
w, a, b = map(int, input().split())
dis = abs(a - b) - w
print(max(dis, 0))


Fixed submission:
a,_,b = input()
print("DH" [a==b])
Buggy python submission (verdict: Runtime Error):
w, a, b = map(int, input().split())
print(min(b-a-w))

Fixed submission:
w, a, b = map(int, input().split())
dis = abs(a - b) - w
print(max(dis, 0))
Buggy python submission (verdict: Runtime Error):
a, b = map(lambda x:(int(x) + 13) % 15, input().split())
if a > b: print("Alice")
  if a < b: print("Bob")
    else: print("Draw")

Fixed submission:
a, b = map(lambda x:(int(x) + 13) % 15, input().split())
if a > b: print("Alice")
elif a < b: print("Bob")
else: print("Draw")
Buggy python submission (verdict: Runtime Error):
input()
s = input()

x,m = 0, 0

for i in range(n):
  if s[i]=="I":
    x += 1
    m = max(x, m)
    
  if s[i]=="D":
    x -= 1
    m = max(x, m)

print(m)


Fixed submission:
input()
s = input()

x,m = 0, 0

for i in range(len(s)):
  if s[i]=="I":
    x += 1
    m = max(x, m)
    
  if s[i]=="D":
    x -= 1
    m = max(x, m)

print(m)
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()
print(a, b, c)

Fixed submission:
a, b, c  = input().split(",")
print(a, b, c)
Buggy python submission (verdict: Runtime Error):
a, s ,c = map(input().split())
print('A'+s[0]+'C')

Fixed submission:
print("A"+input()[8]+"C")
Buggy python submission (verdict: Runtime Error):
print("A"+input()[8]+"C")

Fixed submission:
a, b, c = map(int, input().split())
if a+b == c or b+c == a or c+a == b:
  print('Yes')
else: 
  print('No')
Buggy python submission (verdict: Runtime Error):
print((input()+input())*input()//2)

Fixed submission:
x = lambda:int(input())
print((x()+x())*x()//2)
Buggy python submission (verdict: Runtime Error):
n, k, x, y = [(int(input()) for i in range(4))]
print(x*n - (x - y)*max(0, n-k))


Fixed submission:
n,k,x,y=[int(input()) for i in range(4)]
print(n*x-(x-y)*max(n-k,0))

Buggy python submission (verdict: Runtime Error):
n, k, x, y = [(int(input()), for i in range(4))]
print(x*n - (x - y)*max(0, n-k))


Fixed submission:
n,k,x,y=[int(input()) for i in range(4)]
print(n*x-(x-y)*max(n-k,0))

Buggy python submission (verdict: Runtime Error):
n, k, x, y = [map(int(input()), for i in range(4))]
print(x*n - (x - y)*max(0, n-k))


Fixed submission:
n,k,x,y=[int(input()) for i in range(4)]
print(n*x-(x-y)*max(n-k,0))

Buggy python submission (verdict: Runtime Error):
n, k, x, y = [map(int(input()), for i in range(4))]
print(x*n - (x - y)*max(0, n - k))


Fixed submission:
n,k,x,y=[int(input()) for i in range(4)]
print(n*x-(x-y)*max(n-k,0))

Buggy python submission (verdict: Runtime Error):
n, k, x, y = [map(int(input()), for i in range(4))]
print(x*n - (x - y)*max(0, n - k)


Fixed submission:
n,k,x,y=[int(input()) for i in range(4)]
print(n*x-(x-y)*max(n-k,0))

Buggy python submission (verdict: Runtime Error):
n, k, x, y = [map(int(input()), for i in range(4))]
print(x * n - (x - y)*max(0, n - k)

Fixed submission:
n,k,x,y=[int(input()) for i in range(4)]
print(n*x-(x-y)*max(n-k,0))
Buggy python submission (verdict: Runtime Error):
li = list(map(int, input().split()))
if li  = [5,5,7] or [5,7,5] or [7,5,5]:
  print('Yes')
else:
  print('No')

Fixed submission:
li = list(map(int, input().split()))
if li == [5,5,7] or li == [5,7,5] or li == [7,5,5]:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
  if ((a == b == 5 and c == 7) or (a == c == 5 and b == 7) or (b == c == 5 and a == 7)):
    print("Yes")
  else: print("No")


Fixed submission:
li = list(map(int, input().split()))
if li == [5,5,7] or li == [5,7,5] or li == [7,5,5]:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
a, b, c = map(input().split())
if a + b + c == 17:
  if (a == b == 5 and c == 7) or (a == c == 5 and b == 7) or (b == c == 5 and a == 7):
    print("Yes")
  else: print("No")

Fixed submission:
li = list(map(int, input().split()))
if li == [5,5,7] or li == [5,7,5] or li == [7,5,5]:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if c/b=>a/d or  c//b=a//d:
    print("Yes")
else:
    print("No")


Fixed submission:
a,b,c,d=map(int,input().split())
if c%b==0:
    c=c-1
if a%d==0:
    a=a-1
if  c//b==a//d:
    print("Yes")
elif c/b<a/d:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):

def onajitoki(i,j):
    global li
    del li[j]
    return 0
#同じときliのj要素を消去

n=int(input())
li=[input() for i in range(n)]
li.extend([0])
k=0
i=0
while li[i]!=0:
    j=i
    while li[j+1]!=0:
        
        if li[i]==li[j+1]:
            op=onajitoki(i,j+1)

        else:j=j+1
    i=i+1

print(len(li)-1)


Fixed submission:
n=int(input())
a=[input() for i in range(n)]
print(len(set(a)))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
for i in range(n-1):
    j=i
    k=0
    while j<n-1:
        if i+1==a[j]:
            k=k+1
        j=j+1

    print(k)
print(0)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
 
jyoshi=[0]*n
for i in range(n-1):
  jyo=a[i]
  jyoshi[jyo-1]=jyoshi[jyo-1]+1
  
for k in jyoshi:
  print(k)
Buggy python submission (verdict: Runtime Error):
n,m=(int(x) for x in input().split())
k=m+1
s=[0]*k
c=[0]*k
answer=0
for i in range(m):
    s[i+1],c[i+1]=(int(x) for x in input().split())


a=[-1]*10

for i in range(m):
    if a[s[i+1]]==-1:
        a[s[i+1]]=c[i+1]
    elif not a[s[i+1]]==c[i+1]:
        answer=-1
if a[1]==0 and not n=1:
    answer=-1
if a[1]==-1 and not n=1:
    a[1]=1
if a[1]==-1 and n=1:
    a[1]=0
for i in range(10):
    if a[i]==-1:
        a[i]=0

if answer==0:
    for i in range(n):
        d=n-i-1
        answer+=10**d*a[i+1]
print(answer)


Fixed submission:
n,m=(int(x) for x in input().split())
k=m+1
s=[0]*k
c=[0]*k
answer=0
for i in range(m):
    s[i+1],c[i+1]=(int(x) for x in input().split())


a=[-1]*10

for i in range(m):
    if a[s[i+1]]==-1:
        a[s[i+1]]=c[i+1]
    elif not a[s[i+1]]==c[i+1]:
        answer=-1
if a[1]==0 and not n==1:
    answer=-1
if a[1]==-1 and not n==1:
    a[1]=1
if a[1]==-1 and n==1:
    a[1]=0
for i in range(10):
    if a[i]==-1:
        a[i]=0

if answer==0:
    for i in range(n):
        d=n-i-1
        answer+=10**d*a[i+1]
print(answer)