Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
k = ((10*g) + b)%4
if k == 0 :print('YES')
  else:print('NO')

Fixed submission:
r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')

Buggy python submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
k = (10*g + b)%4
if k == 0 :print('YES')
  else:print('NO')

Fixed submission:
r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')

Buggy python submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
if (((10*g)+b)%4) == 0 :print('YES')
  else:print('NO')

Fixed submission:
r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')

Buggy python submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
if (10*g + b )%4 == 0 :print('YES')
  else:print('NO')

Fixed submission:
r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')

Buggy python submission (verdict: Runtime Error):
r,g,b=map(int,input().split())
if ((g+b)%4) == 0 :print('YES')
  else:print('NO')

Fixed submission:
r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[map(int,input().split())]
a=map(lambda x:x//400,a)
a1=[i for i in a if i<8]
a2=[i for i in a if i>7]
k=len(set(a1))
if k+len(a2)>8:m=8
else:m=k+len(a2)

print(len(set(a1)),m)

Fixed submission:
import numpy as np
n=int(input())
a=list(map(int,input().split()))
a=np.array(a)
a=a//400
a1=[i for i in a if i<8]
a2=[i for i in a if i>=8]
k=len(set(a1))
m=k+len(a2)
#>8:m=8 else:m=k+len(a2)
if len(set(a1))!=0:s=len(set(a1))
else:s=1
print(s,m)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a+b >= 10:print('error')
  else:print(a+b)

Fixed submission:
a,b=map(int,input().split())
if (a+b)>=10:print('error')
else:print(a+b)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a+b>=10:print('error')
  else:print(a+b)

Fixed submission:
a,b=map(int,input().split())
if (a+b)>=10:print('error')
else:print(a+b)
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
a= [list(map(input().split())) for _ in range(h)]
print('#'*(w+2))
for i in range(h):
    print('#'+"".join(a[i])+'#')
print('#'*(w+2))

Fixed submission:
h,w=map(int,input().split())
a= [list(input().split()) for _ in range(h)]
print('#'*(w+2))
for i in range(h):
    print('#'+"".join(a[i])+'#')
print('#'*(w+2))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
n,k=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n)]
ab.sort()
l=[]
m=0
for i in range(len(ab)):
    for j in range(ab[i][1]):
        l.append(ab[i][0])
        m+=1
    if m>k:break
print(l[k-1])

Fixed submission:
import sys
input = sys.stdin.readline
n,k=map(int,input().split())
l=[0]*10**5
for i in range(n):
    a,b=map(int,input().split())
    l[a-1]+=b
m=0
for i in range(10**5):
    if m+l[i]>=k:print(i+1);break
    else: m+=l[i]

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n)]
ab.sort()
l=[]
for i in range(len(ab)):
    for j in range(ab[i][1]):
        l.append(ab[i][0])
    if len(l)>k:break
print(l[k-1])

Fixed submission:
import sys
input = sys.stdin.readline
n,k=map(int,input().split())
l=[0]*10**5
for i in range(n):
    a,b=map(int,input().split())
    l[a-1]+=b
m=0
for i in range(10**5):
    if m+l[i]>=k:print(i+1);break
    else: m+=l[i]

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n)]
ab.sort()
l=[]
for i in range(len(ab)):
    for j in range(ab[i][1]):
        l.append(ab[i][0])
    if len(l)>k:break
print(l[k-1])

Fixed submission:
import sys
input = sys.stdin.readline
n,k=map(int,input().split())
l=[0]*10**5
for i in range(n):
    a,b=map(int,input().split())
    l[a-1]+=b
m=0
for i in range(10**5):
    if m+l[i]>=k:print(i+1);break
    else: m+=l[i]
Buggy python submission (verdict: Runtime Error):
a,b,c=list(map(str,input().split()))
if a[-1]==b[0] and b[-1]==c[0]:print('YES')
else print('NO')

Fixed submission:
a,b,c=list(map(str,input().split()))
if a[-1]==b[0] and b[-1]==c[0]:print('YES')
else:print('NO')

Buggy python submission (verdict: Runtime Error):
|A|,|B|,|C| = list(map(int,input().split()))
a,b,c=list(map(str,input().split()))
if a[|A|-1]==b[0] and b[|B|-1]==c[0] :print('YES')
else:print('NO')

Fixed submission:
a,b,c=list(map(str,input().split()))
if a[-1]==b[0] and b[-1]==c[0]:print('YES')
else:print('NO')
Buggy python submission (verdict: Runtime Error):
s1,s2,s3=map(str,input().split().capitalize()) #文字列
print(s1[0]+s2[0]+s3[0])

Fixed submission:
s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])

Buggy python submission (verdict: Runtime Error):
s1,s2,s3=input().split().capitalize() #文字列
print(s1[0]+s2[0]+s3[0])

Fixed submission:
s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])

Buggy python submission (verdict: Runtime Error):
s1,s2,s3 = list(map(str,input(),split()))
s1,s2,s3 = map(str.upper())
print( s1[0] + s2[0] + s3[0])

Fixed submission:
s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])

Buggy python submission (verdict: Runtime Error):
s1,s2,s3 = list(map(str,input()))
s1,s2,s3 = map(str.upper())
print( s1[0] + s2[0] + s3[0])

Fixed submission:
s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])

Buggy python submission (verdict: Runtime Error):
a,b,c = list(map(str,input()))
a,b,c = map(str.upper())
print( a[0] + b[0] + c[0])

Fixed submission:
s1,s2,s3=map(str,input().upper().split()) #文字列
print(s1[0]+s2[0]+s3[0])
Buggy python submission (verdict: Runtime Error):
a,b,c=list(map(int,input().split()))
if b-a==c-b:print(YES)
else:print(NO)

Fixed submission:
a,b,c=list(map(int,input().split()))
if b-a==c-b:print('YES')
else:print('NO')
Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
k=int(math.sqrt(n))
l=[]
for i in range(1,k+2):
    if n%i==0:l.append(max(len(str(i),len(str(n//i))))
print(min(l))

Fixed submission:
import math
n=int(input())
k=int(math.sqrt(n))
l=[]
for i in range(1,k+2):
    if n%i==0:l.append(max( len(str(i)), len(str(n//i)) ))
print(min(l))

Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
k=int(math.sqrt(n))
l=[]
for i in range(1,k+2):
    n%i==0:l.append(max(len(str(i),len(str(n//i))))
print(min(l))

Fixed submission:
import math
n=int(input())
k=int(math.sqrt(n))
l=[]
for i in range(1,k+2):
    if n%i==0:l.append(max( len(str(i)), len(str(n//i)) ))
print(min(l))
Buggy python submission (verdict: Runtime Error):
a, b = input().split()

if a='H' and b='H':print('H')
elif a='D' and b='D':print('H')
else:print('D')

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

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')

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

if a==H and b==H:print('H')
elif a==D and b==D:print('H')
else:print('D')

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

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')

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

if a=H and b=H:print('H')
elif a=D and b=D:print('H')
else:print('D')

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

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')

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

if a==H and b==H:print(H)
elif a==D and b==D:print(H)
else:print(D)

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

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')

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

if a=H and b=H:print(H)
elif a=D and b=D:print(H)
else:print(D)

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

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')

Buggy python submission (verdict: Runtime Error):
if a='H' and b='H':print(H)
elif a='D' and b='D':print(H)
else:print(D)

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

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
k=1
for i in range(1,n+1):
    k*=i
print( k%((10**9)+7) )

Fixed submission:
n=int(input())
k=1
for i in range(1,n+1):
    k=(k*i)%((10**9)+7)
print(k)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())#正方形
a= [list(input()) for _ in range(n)] #大
b= [list(input()) for _ in range(m)] #小
m1=0
for i in range(n-m+1): #行
    for j in range(n-m+1): #左からの位置
      if b[i][j+k]==a[i][j] for k in range(n-m+1):m1+=1
        if m1==m:print('Yes') and exit()
        else:pass
      else:print('No')

Fixed submission:
n,m = map(int,input().split()) #要復習
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
 
for i in range(n-m+1):
    for j in range(n-m+1):
        a1 = [a[k][j:j+m] for k in range(i,i+m)]
        if a1 == b:
            print('Yes')
            exit()

print('No')

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())#正方形
a= [list(input()) for n in range(n)] #大
b= [list(input()) for m in range(m)] #小
m1=0
for i in range(n-m+1): #行
    for j in range(n-m+1): #左からの位置
      if b[i][j+k]==a[i][j] for k in range(n-m+1):m1+=1
        if m1==m:print('Yes') and exit()
        else:pass
      else:print('No')

Fixed submission:
n,m = map(int,input().split()) #要復習
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
 
for i in range(n-m+1):
    for j in range(n-m+1):
        a1 = [a[k][j:j+m] for k in range(i,i+m)]
        if a1 == b:
            print('Yes')
            exit()

print('No')
Buggy python submission (verdict: Runtime Error):
A,B,C,D=list(map(int,input()))
ab=A*B
cd=C*D
if ab>cd:print(ab)
elif cd>ab:print(cd)
else:print(ab)

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

ab = a*b
cd = c*d
if ab>cd:print(ab)
elif cd>ab:print(cd)
else:print(ab)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=list(input())
k=[0]
for i in range(0,n):
    if s[i]=='I':k.append(int(k[i]+1)
    else:k.append(int(k[i]-1))
print(max(k))

Fixed submission:
n=int(input())
s=list(input())
k=[0]
for i in range(0,n):
    if s[i]=='I':k.append(int(k[i]+1))
    else:k.append(int(k[i]-1))
print(max(k))
Buggy python submission (verdict: Runtime Error):
s1,s2,s3=list(map(str,input().split(,)))
print(s1 , s2 , s3)

Fixed submission:
s1,s2,s3=list(map(str,input().split(',')))
print(s1 , s2 , s3)

Buggy python submission (verdict: Runtime Error):
s1,s2,s3=list(map(str,input().split(,)))
print(s1 +''+ s2 +''+ s3)

Fixed submission:
s1,s2,s3=list(map(str,input().split(',')))
print(s1 , s2 , s3)

Buggy python submission (verdict: Runtime Error):
s1,s2,s3=list(map(str,input().split()))
print(s1[:5] +''+ s2[:7] +''+ s3[:5])

Fixed submission:
s1,s2,s3=list(map(str,input().split(',')))
print(s1 , s2 , s3)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(a+b or a-b)


Fixed submission:
a,op,b=input().split() #文字列
if op=='+':print(int(a)+int(b))
else:print(int(a)-int(b))

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

print(A+B or A-B)

Fixed submission:
a,op,b=input().split() #文字列
if op=='+':print(int(a)+int(b))
else:print(int(a)-int(b))
Buggy python submission (verdict: Runtime Error):
n=int(input())
t=list(map(int,input().split()))
sumt=sum(t)
m=int(input())

for i in range(m):
    px = [list(map(int, input().split())) for _ in range(m)]
    a=t[px[i][0]-1]
    b=px[i][1]
    print(sumt-a+b)

Fixed submission:
n=int(input())
t=list(map(int,input().split()))
sumt=sum(t)
m=int(input())
px = [list(map(int, input().split())) for _ in range(m)]
for i in range(m):   
    a=t[px[i][0]-1]
    b=px[i][1]
    print(sumt-a+b)

Buggy python submission (verdict: Runtime Error):
n=int(input())
t=list(int(input().split()))
m=int(input())
px = [list(map(int, input().split())) for _ in range(m)]

for i in range(m):
    t[px[i][0]]=px[i][1]
    print(sum(t))

Fixed submission:
n=int(input())
t=list(map(int,input().split()))
sumt=sum(t)
m=int(input())
px = [list(map(int, input().split())) for _ in range(m)]
for i in range(m):   
    a=t[px[i][0]-1]
    b=px[i][1]
    print(sumt-a+b)
Buggy python submission (verdict: Runtime Error):
a,s,c=map(input().split())
print(a[0]+s[0]+c[0])

Fixed submission:
a,s,c=input().split()
print(a[0]+s[0]+c[0])

Buggy python submission (verdict: Runtime Error):
a,s,c=str(input().split())
print(a[0]+s[0]+c[0])

Fixed submission:
a,s,c=input().split()
print(a[0]+s[0]+c[0])

Buggy python submission (verdict: Runtime Error):
a,s,c=input().split()
print(f'{a[0]}{s[0]}{c[0]}')

Fixed submission:
a,s,c=input().split()
print(a[0]+s[0]+c[0])

Buggy python submission (verdict: Runtime Error):
a,s,c=map(str,input().split())
print(f'{a[0]}{s[0]}{c[0]}')

Fixed submission:
a,s,c=input().split()
print(a[0]+s[0]+c[0])

Buggy python submission (verdict: Runtime Error):
a,s,c=str(input().split())
print(f'{a[0]}{s[0]}{c[0]}')

Fixed submission:
a,s,c=input().split()
print(a[0]+s[0]+c[0])

Buggy python submission (verdict: Runtime Error):
a,s,c=map(str(input().split()).capitalize())
print(f'{"A"}{s[0]}{"C"}')


Fixed submission:
a,s,c=input().split()
print(a[0]+s[0]+c[0])

Buggy python submission (verdict: Runtime Error):
s=str(input()).capitalize()
print(f'{"A"}{s[0]}{"C"}')


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


Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('Yes')
else:print('No')

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


Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('Yes')
else:print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('YES')
  else:print('NO')


Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('Yes')
else:print('No')

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

Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('Yes')
else:print('No')

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())

if a==b+c or b==a+c or c==a+b:
   print(Yes)
else:print(No)

Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b+c or b==a+c or c==a+b :print('Yes')
else:print('No')
Buggy python submission (verdict: Runtime Error):
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
w1=w
h1=h
for i in range(n):
    if xya[i][2]==1:w1=w-int(xya[i][0])
    elif xya[i][2]==2:w1-=(w-int(xya[i][0])
    elif xya[i][2]==3:h1=h-int(xya[i][1])
    elif xya[i][2]==4:h1-=(h-int(xya)[i][1])
    else:pass
if w1>0 and h1>0:print(w1*h1)
else:print(0)


Fixed submission:
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
wl,wr,hu,ht=0,w,0,h
for i in range(n):
    if xya[i][2]==1:
        wl=max(wl,int(xya[i][0]))
    elif xya[i][2]==2:
        wr=min(wr,int(xya[i][0]))
    elif xya[i][2]==3:
        hu=max(hu,int(xya[i][1]))
    elif xya[i][2]==4:
        ht=min(ht,int(xya[i][1]))
    else:pass
if wl>wr or hu>ht:print(0)
else:print((wr-wl)*(ht-hu))

Buggy python submission (verdict: Runtime Error):
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
xya.sort(a)
w1=w
h1=h
for i in range(n):
    if xya[i][2]==1:w1=w-int(xya[i][0])
    elif xya[i][2]==2:w1-=(w-int(xya[i][0])
    elif xya[i][2]==3:h1=h-int(xya[i][1])
    elif xya[i][2]==4:h1-=(h-int(xya)[i][1])
    else:pass
if w1>0 and h1>0:print(w1*h1)
else:print(0)


Fixed submission:
w,h,n=map(int,input().split())
xya = [list(map(int, input().split())) for _ in range(n)]
wl,wr,hu,ht=0,w,0,h
for i in range(n):
    if xya[i][2]==1:
        wl=max(wl,int(xya[i][0]))
    elif xya[i][2]==2:
        wr=min(wr,int(xya[i][0]))
    elif xya[i][2]==3:
        hu=max(hu,int(xya[i][1]))
    elif xya[i][2]==4:
        ht=min(ht,int(xya[i][1]))
    else:pass
if wl>wr or hu>ht:print(0)
else:print((wr-wl)*(ht-hu))
Buggy python submission (verdict: Runtime Error):
if a==b==c:print('1')
elif a==b or b==c or c==a:print('2')
else:print('3')

Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b==c:print('1')
elif (a==b and c!=a) or (b==c and a!=b) or (c==a and b!=c):print('2')
else:print('3')

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a==b==c:
  print(1)
elif a==b or b==c or c==a:
  print(2)
else:print(3)
print(a,b,c)

Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b==c:print('1')
elif (a==b and c!=a) or (b==c and a!=b) or (c==a and b!=c):print('2')
else:print('3')

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())

if a=b=c:
  print(1)
elif a=b or b=c or c=a:
  print(2)
else:print(3)

Fixed submission:
a,b,c = list(map(int,input().split()))
if a==b==c:print('1')
elif (a==b and c!=a) or (b==c and a!=b) or (c==a and b!=c):print('2')
else:print('3')
Buggy python submission (verdict: Runtime Error):
N=int(N)
print( int(((1+N)*N)/2) )

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

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

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

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

Fixed submission:
N=int(input())
print( int(((1+N)*N)/2) )
Buggy python submission (verdict: Runtime Error):
a,b,c=list(map(int,input().split()))
k.sort()
if k[0] == k[1] == 5 and k[2] == 7:
   print(Yes)
else:print(No)

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
if (a==5 and b==5 and c==7) or (a==5 and b==7 and c==5) or (a==7 and b==5 and c==5):
   print(Yes)
else:print(No)

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
 
if A=5 and B=5 and C=7:
    print('YES')
elif A=5 and B=7 and C=5:
    print('YES')
elif A=7 and B=5 and C=5:
    print('YES')
else:print('NO')

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())

if A==5 and B==5 and C==7:
    print('YES')
elif A==5 and B==7 and C==5:
    print('YES')
elif A==7 and B==5 and C==5:
    print('YES')
else:print('NO')

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
if A==5 and B==5 and C==7:
    print('YES')
elif A==5 and B==7 and C==5:
    print('YES')
elif A==7 and B==5 and C==5:
    print('YES')
else:print('NO')

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
if [A,B,C]=[5,5,7]or[5,7,5]or[7,5,5]:
   print(YES)
   else:print(NO)

Fixed submission:
a = list(map(int,input().split()))
a.sort()
if a[0] == a[1] == 5 and a[2] == 7:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
n,l=map(int,input().split())
s=[input() for i in range(n)]
s.sort()
print(*a,sep="")

Fixed submission:
n,l=map(int,input().split())
s=[input() for i in range(n)]
s.sort()
print(*s,sep="")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

left = 0
right = n - 1
ans = 0

for i in range(n):
    left = 0
    right = n - 1
    while left <= right:
        if i == left == right:
            left, right = left + 1, right - 1
            continue

        elif i == left:
            if a[i] % a[right] == 0:
                break

        elif i == right:
            if a[i] % a[left] == 0:
                break

        else:
            if a[i] % a[left] == 0 or a[i] % a[right] == 0:
                break

        left, right = left + 1, right - 1

    if left > right:
        ans += 1

print(ans)


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

ans = 0
dp = [0] * (a[-1] + 1)

for i in range(n):
    tmp = a[i]
    while tmp <= a[-1]:
        dp[tmp] += 1
        tmp += a[i]

for i in a:
    if dp[i] == 1:
        ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import fractions

n = int(input())
a = list(map(int, input().split()))
b = []
tmp = a[0]
ans = 0

for i in range(1, n):
    tmp = tmp * a[i] // fractions.gcd(tmp, a[i])

for i in a:
    ans += tmp // i
    b.append(tmp // i)

print(ans % (10 ** 9 + 7))


Fixed submission:
import fractions

n = int(input())
a = list(map(int, input().split()))
tmp = a[0]
ans = 0

for i in range(1, n):
    tmp = tmp * a[i] // fractions.gcd(tmp, a[i])

for i in a:
    ans += tmp // i

print(ans % (10 ** 9 + 7))
Buggy python submission (verdict: Runtime Error):
count = 1
tmpp, tmpq = 0, 0
li = []

for i in range(1, n + 1):
    li.append(i)

pattern = list(itertools.permutations(li))

for i in pattern:
    if i == p:
        tmpp = count

    if i == q:
        tmpq = count

    count += 1

print(abs(tmpp - tmpq))


Fixed submission:
import itertools

n = int(input())
p = tuple(map(int, input().split()))
q = tuple(map(int, input().split()))

count = 1
tmpp, tmpq = 0, 0
li = []

for i in range(1, n + 1):
    li.append(i)

pattern = list(itertools.permutations(li))

for i in pattern:
    if i == p:
        tmpp = count

    if i == q:
        tmpq = count

    count += 1

print(abs(tmpp - tmpq))
Buggy python submission (verdict: Runtime Error):
import fractions

a, b = map(int, input().split())
print(a * b / gcd(a, b))


Fixed submission:
import fractions
 
a, b = map(int, input().split())
print(a * b // fractions.gcd(a, b))
Buggy python submission (verdict: Runtime Error):
x = int(input())
count = 0

def dfs(total, x):
    if total > x:
        return False

    if total == x:
        return total == x

    if dfs(total + 100, x):
        return True

    if dfs(total + 101, x):
        return True

    if dfs(total + 102, x):
        return True

    if dfs(total + 103, x):
        return True

    if dfs(total + 104, x):
        return True

    if dfs(total + 105, x):
        return True

print(1 if dfs(0, x) else 0)


Fixed submission:
x = input()

ans = 0

if len(x) < 3:
    ans = 0

elif len(x) < 4:
    tmp1 = int(x[-2] + x[-1])
    tmp2 = int(x[0])
    if tmp2 * 5 >= tmp1:
        ans = 1

else:
    tmp1 = int(x[-2] + x[-1])
    tmp2 = int(x[-4] + x[-3])
    if tmp2 * 5 >= tmp1:
        ans = 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
output = "No"

for i in range(1, n - 1):
    if n % i != 0:
        continue

    else:
        tmp = s[:i:]
        if tmp * (n // i) == s:
            output = "Yes"


print(output)


Fixed submission:
r = int(input())

print(r ** 2)