qyliang/CodeNanoFix huggingface dataset:
Buggy code:
words = list(input().split())

print(words)

for i in range(len(words)-1):
	if words[i][-1] == words[i+1][0]:
		ans = 'YES'
	else:
		ans = 'NO'
		break
		
print(ans)


Fixed code:
words = list(input().split())


for i in range(len(words)-1):
	if words[i][-1] == words[i+1][0]:
		ans = 'YES'
	else:
		ans = 'NO'
		break
		
print(ans)
Buggy code:
a,b,c = map(str,input().split())
if a[-1]=b[0] and b[-1]=c[0]:
  print('YES')
else:
  print('NO')

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


Fixed code:
a,b,c=input().split()
if (a[len(a)-1]==b[0])&(b[len(b)-1]==c[0]):
    print('YES')
else:
    print('NO')
Buggy code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    A, B, C = map(int, readline().split())

    if A[-1] == B[0] and B[-1] == C[0]:
        print("YES")
    else:
        print("NO")


if __name__ == '__main__':
    main()


Fixed code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    A, B, C = input().split()

    if A[-1] == B[0] and B[-1] == C[0]:
        print("YES")
    else:
        print("NO")


if __name__ == '__main__':
    main()
Buggy code:
A, B, C = input().split()


if A[-1] == B[0] && B[-1] == C[0]:
    print('YES')
else:
    print('NO')










Fixed code:
A, B, C = input().split()


if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('NO')
Buggy code:
A,B,C=[i for i in input().split()]
if A[-1]==B[0]:
    if B[-1]==C[0]:
        print('YES')
    else:
        print('NO')

Fixed code:
A,B,C=[i for i in input().split()]
if A[-1]==B[0]:
    if B[-1]==C[0]:
        print('YES')
    else:
        print('NO')
else:
    print('NO')
Buggy code:
A,B,C = input().split()
if A[-1] == B[0] and B[-1] == C[0]:
    print('YES'):
else:
    print('NO')

Fixed code:
A,B,C = input().split()
if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')

else:
    print('NO')
Buggy code:
l = input().split()
def shiritori (letter):
    if letter[0][-1:] == letter[1][:1]:
        if letter[1][-1:] == letter[2][:1]:
            return('YES')
        else return('NO')
    else return('NO')
shiritori(l)

Fixed code:
l = input().split()
def shiritori (letter):
    if letter[0][-1:] == letter[1][:1]:
        if letter[1][-1:] == letter[2][:1]:
            return(print('YES'))
        else:
            return(print('NO'))
    else:
        return(print('NO'))
shiritori(l)
Buggy code:
Nstr = input().split()
result = 'YES'
for i in range(2):
    print(Nstr[i][-1] , Nstr[i + 1][0])
    if Nstr[i][-1] != Nstr[i + 1][0]:
        result = 'NO'
print(result)

Fixed code:
Nstr = input().split()
result = 'YES'
for i in range(2):
    if Nstr[i][-1] != Nstr[i + 1][0]:
        result = 'NO'
print(result)
Buggy code:
a,b,c=input().split();print('YNEOS'[a[-1]+c[0]==b[-1]+b[0]::2])

Fixed code:
a,b,c=input().split();print('YNEOS'[a[-1:]+c[0]!=b[0]+b[-1:]::2])
Buggy code:
def iroha():
    a, b, c = input().split()
    
    s = a[len(a)-1]
    sshead = b[0]
    sstail = b[len(b)-1]
    sss = c[0]

    if s == sshead and sstail and sss:
        print("YES")
    else:
        print("NO")





if __name__ == "__main__":
    iroha()



Fixed code:
def iroha():
    a, b, c = input().split()
    
    s = a[len(a)-1]
    sshead = b[0]
    sstail = b[len(b)-1]
    sss = c[0]

    if s == sshead and sstail == sss:
        print("YES")
    else:
        print("NO")





if __name__ == "__main__":
    iroha()
Buggy code:
a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print(’YES’)
else:
print(’NO’)

Fixed code:
a, b, c = input().split()

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
	print("YES")
else:
	print("NO")
Buggy code:
a,b,c=input().split()
if a[1:]==b[:1] and b[1:]==c[:1]:
  print("YES")
else:
  print("NO")

Fixed code:
a,b,c=input().split()
if a[-1:]==b[:1] and b[-1:]==c[:1]:
  print("YES")
else:
  print("NO")
Buggy code:
a,b,c=input().split()

if a[0]==b[-1] anb [0] == c[-1]:
  print('YES')
else:
  print('NO')


Fixed code:
a,b,c=input().split()
 
if a[-1]==b[0] and b[-1] == c[0]:
  print('YES')
else:
  print('NO')
Buggy code:
A, B, C = map(str, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('No')

Fixed code:
A, B, C = map(str, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('NO')
Buggy code:
a,b,c=input().split();print('YNEOS'[a[-1]+c[0]!=b[::len(b)-1]::2])

Fixed code:
a,b,c=input().split()
print('YNEOS'[a[-1]+c[0]!=b[0]+b[-1]::2])
Buggy code:
A,B,C = input().split()

if A[len(A)-1]==B[0] and B[len(B)-1]==C[0]:
  print("YES)
else:
  print("NO")

Fixed code:
A, B, C = input().split()
print('YES' if A[-1]==B[0] and B[-1] == C[0] else 'NO')
Buggy code:
a,b,c=map(str,input().split())
Flag = 1
if a[len(a)-1]!=b[0]:
  Flag =0
if b[len(b)-1]!=c[0]:
  Flag =0
if Flag = 0:
  print("NO")
else:
  print("YES")

Fixed code:
a,b,c=map(str,input().split())
Flag = 1
if a[len(a)-1]!=b[0]:
  Flag =0
if b[len(b)-1]!=c[0]:
  Flag =0
if Flag == 0:
  print("NO")
else:
  print("YES")
Buggy code:
a,b,c=input()
print('YES' if a[-1]==b[0] and b[-1] == c[0] else 'NO')

Fixed code:
a,b,c=input().split()
print('YES' if a[-1]==b[0] and b[-1] == c[0] else 'NO')
Buggy code:
from statistics import mean, median,variance,stdev
import sys
import math

x = input().split()
#y = input().split()
a= []
#for i in range(len(x)):
 #   a.append(int(x[i]))

if x[0][len(x[0])-1] == x[1][0] and x[1][len(x[1])-1] == x[2][0]:print("Yes")
else:print("No")

Fixed code:
from statistics import mean, median,variance,stdev
import sys
import math

x = input().split()
#y = input().split()
a= []
#for i in range(len(x)):
 #   a.append(int(x[i]))

if x[0][len(x[0])-1] == x[1][0] and x[1][len(x[1])-1] == x[2][0]:print("YES")
else:print("NO")
Buggy code:
a,b,c = map(str,input().split())

if a[-1]=b[0] and b[-1]=c[0]:
    print("YES")
else:
    print("NO")

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

Fixed code:
a, b, c = input().split()
if a[len(a) - 1] == b[0] and b[len(b) - 1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c = map(str, input().split())
if a[-1] == b[0] and b[-1] and c[0]:
    print("YES")
else:
    print("NO")

Fixed code:
a, b, c = input().split()

if a[-1] == b[0] and b[-1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=input().split();print("YNeos"[a[-1]!=b[0]or b[-1]!=c[0]::2])

Fixed code:
a,b,c=input().split();print("YNEOS"[a[-1]!=b[0]or b[-1]!=c[0]::2])
Buggy code:
A,B,C = map(str,input().split())

flag = True
if A[-1] != B[0]:
    flag = False

if B[-1] == C[0]:
    flag = False

if flag:
    print('YES')
else:
    print('NO')

Fixed code:
A,B,C = map(str,input().split())

flag = True
if A[-1] != B[0]:
    flag = False

if B[-1] != C[0]:
    flag = False

if flag:
    print('YES')
else:
    print('NO')
Buggy code:
A=list(map(str, input().split()))
a=['']*3
b=['']*10
tmp1=''
tmp2=''
p=0
for i in range(3):
    a[i]=list(A[i])
    if i!=0:
        a[0]=tmp2
    if tmp1!='':
        if tmp1!=tmp2:
            p=1
    a[i]=reversed(a[i])
    b[i]=list(a[i])
    b[0]=tmp1
if p==0:
    print('YES')
else:
    print('NO')
  
  


Fixed code:
A=list(map(str, input().split()))
a=['']*3
b=['']*10
tmp1=''
tmp2=''
p=0
for i in range(3):
    a[i]=list(A[i])
    if i!=0:
        tmp2=a[i][0]
    if tmp1!='':
        if tmp1!=tmp2:
            p=1
    a[i]=list(reversed(a[i]))
    b=list(a[i])
    tmp1=b[0]
if p==0:
    print('YES')
else:
    print('NO')
Buggy code:
A, B, C = input().split()

if A(len(A)-1) == B[0] and B(len(B)-1) == C[0]:
  print("YES")
else:
  print("NO")

Fixed code:
A,B,C =(input().split())

if A[-1]==B[0] and B[-1]==C[0]:
    print("YES")

else:
    print("NO")
Buggy code:
a=input()

b=a.split(' ')

if b[0][-1]==b[1][0] and b[1][-1]==b[2][0]:
  print('YES')
else:
  print('N0')

Fixed code:
a=input()

b=a.split(' ')

if b[0][-1]==b[1][0] and b[1][-1]==b[2][0]:
  print('YES')
else:
  print('NO')
Buggy code:
a,b,c = input().split()
print('YNeos'[a[-1]!=b[0]or b[-1]!=c[0]::2])

Fixed code:
a,b,c = input().split()
print('YNEOS'[a[-1]!=b[0] or b[-1]!=c[0]::2])
Buggy code:
a, b, c = input().split()

if a[-1] == b[1] and b[-1] == c[1]:
    print("YES")
else:
    print("NO")

Fixed code:
a, b, c = input().split()
if a[-1] == b[0] and b[-1] == c[0]: print('YES')
else: print('NO')
Buggy code:
A, B, C = map(int, input().split())
if (A[-1]==B[0]) and (B[-1]==C[0]):
  print('YES')
else:
  print('NO')

Fixed code:
A, B, C = input().split()
if(A[-1] == B[0] and B[-1] == C[0]):
  print("YES")
else:
  print("NO")
Buggy code:
a, b, c = input().split()
print("YES" if a[0] == b[-1] and b[-1] == c[0] else "NO")


Fixed code:
a, b, c = input().split()

if(a[-1] == b[0] and b[-1] == c[0]):
    print("YES")
else:
    print("NO")
Buggy code:
A, B, C = input().split()

if A[-1] == B[0] and B[-1] and C[-1]:
    print('YES')
else:
    print('NO')

Fixed code:
A,B,C = input().split()
 
if A[-1]==B[0] and B[-1]==C[0]:
    print("YES")
else:
    print("NO")
Buggy code:
,b,c = input().split()
print('YES') if a[-1] == b[0] and b[-1] == c[0] else print('NO')

Fixed code:
a, b, c = input().split()
if a[-1] ==b[0] and b[-1] ==c[0]:
 print("YES")
else:
 print("NO")
Buggy code:
a, b, c = input().split()
if a[0] == b[-1] and b[0] == c[-1]:
    print('YES')
else:
    print('NO')

Fixed code:
a,b,c = input().split()
if (a[-1] == b[0]) & (b[-1] == c[0]):
    print("YES")
else:
    print("NO")
Buggy code:
A,B,C=input().split()
print("YNeos"[A[-1]!=B[0]or B[-1]!=C[0]::2])

Fixed code:
A,B,C=input().split()
print("YNEOS"[A[-1]!=B[0]or B[-1]!=C[0]::2])
Buggy code:

A,B,C = input().split()

if A[-1] == B[0]:
    if B[-1] == C[0]:
        print("YES")
    else:
        print("NO")


Fixed code:

A,B,C = input().split()

if A[-1] == B[0]:
    if B[-1] == C[0]:
        print("YES")
    else:
        print("NO")
else:
    print("NO")
Buggy code:
a,b,c = input().split()

if a[-1]==b[0]:
    if b[-1]==c[0]:
        print("YES")
else:
    print("NO")


Fixed code:
a,b,c=input().split()
print("YES" if a[-1]==b[0] and b[-1]== c[0] else "NO")
Buggy code:
A,B,C=input().split();print('YNeos'[A[-1]!=B[0]or B[-1]!=C[0]::2])

Fixed code:
A,B,C=input().split();print('YNEOS'[A[-1]!=B[0]or B[-1]!=C[0]::2])
Buggy code:
a,b,c = input.split()

if a[-1] == b[0] and b[-1] == c[0]:
  print('YES')
else:
  print('NO')

Fixed code:
a, b, c = input().split()
print("YES") if a[-1] == b[0] and b[-1] == c[0] else print("NO")
Buggy code:
x,y,z=input(),split()
print("YES" if x[-1]==y[0] and y[-1]==z[0] else "NO")

Fixed code:
x,y,z=input().split()
print("YES" if x[-1]==y[0] and y[-1]==z[0] else "NO")
Buggy code:
A,B,C=input().split()
if A[0]==(B[::-1])[0] and B[0]==(C[::-1])[0]:
    print("YES")
else:
    print("NO")

Fixed code:
A,B,C=map(str,input().split())

if A[-1]==B[0] and B[-1]==C[0]:
  print("YES")
else:
  print("NO")
Buggy code:
A,B,C=map(int,input().split())
ans='NO'
if A[-1]==B[0] and B[-1]==C[0]:
  ans='YES'
print(ans)

Fixed code:
A,B,C=input().split()
ans='NO'
if A[-1]==B[0] and B[-1]==C[0]:
  ans='YES'
print(ans)
Buggy code:
A,B,C=input().split()
if A[-1]==B[0] and B[-1]=C[0]:
  print('YES')
else:
  print('NO')

Fixed code:
A,B,C = input().split()
print("YES" if A[-1] == B[0] and B[-1] == C[0] else "NO")
Buggy code:
a,b,c = map(int,input().split())
if a[-1:]==b[:1] and b[-1:]==c[:1]:
    print("YES")
else:
    print("NO")

Fixed code:
a,b,c = map(str,input().split())
if a[-1:]==b[:1] and b[-1:]==c[:1]:
    print("YES")
else:
    print("NO")
Buggy code:
s = list(input().split())
if s[0].offset(-1) == s[1].offset(0) and s[1].offset(-1) == s[2].offset(0):
  print("YES")
else:
  print("NO")

Fixed code:
s = list(input().split())
if s[0][-1] == s[1][0] and s[1][-1] == s[2][0]:
  print("YES")
else:
  print("NO")
Buggy code:
A, B, C = map(int, input().split())
if A[-1]==B[0] and B[-1]==C[0]:
    print("YES")
else:
    print("NO")

Fixed code:
A, B, C = map(str, input().split())
if A[-1]==B[0] and B[-1]==C[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a, b, c = map(str, input().split())

if a[-1] == b[-1] and b[-1] == c[-1]:
    print("YES")
else:
    print("NO")


Fixed code:
a,b,c = map(str,input().split())

if (a[len(a)-1] == b[0]) and (b[len(b)-1] == c[0]):
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=input().split()
print('YES' if a[-1]=b[0] and b[-1]=c[0] else "NO")


Fixed code:
a,b,c=input().split()
print('YES' if a[-1]==b[0] and b[-1]==c[0] else "NO")
Buggy code:
a, b, c = (i for i in input().split())
print("YES" if a[-1] == b[0] and b[-1] == c[0] else "No")

Fixed code:
a, b, c = (i for i in input().split())
print("YES" if a[-1] == b[0] and b[-1] == c[0] else "NO")
Buggy code:
A, B, C = map(int, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
  print("YES")
else :
  print("NO")

Fixed code:
A,B,C = map(str, input().split())

if (A[-1] == B[0]) and (B[-1] == C[0]):
    print("YES")
else:
    print("NO")
Buggy code:
A, B, C = map(str, input().split())
a = list(A)
b = list(B)
c = list(C)

if a[-1] == b[0] and b[-1] == c[1]:
  print('YES')
else:
  print('NO')

Fixed code:
A, B, C = map(str, input().split())
a = list(A)
b = list(B)
c = list(C)
 
if a[-1] == b[0] and b[-1] == c[0]:
  print('YES')
else:
  print('NO')
Buggy code:
#Shiritori

a,b,c = input().split()

if ( a[-1]==b[0] and b[-1]==c[0] ):
    print("YES")
else:
    prtin("NO")

Fixed code:
#Shiritori
a,b,c = input().split()

if ( a[-1]==b[0] and b[-1]==c[0] ):
    print("YES")
else:
    print("NO")
Buggy code:
#abc060 a 
s=list(input().split())
if s[0][-1]==s[1][0] and s[1][-1]==s[2][0]:
    print("YES")
else:
    print("No")

Fixed code:
#abc060 a
s=list(input().split())
if s[0][-1]==s[1][0] and s[1][-1]==s[2][0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c = input().split()
if('YES' if a[-1]==b[0] and b[-1]==c[0] else 'NO')

Fixed code:
a, b, c = input().split()

if (a[-1]==b[0]) and (b[-1]==c[0]):
  print("YES")
else:
  print("NO")
Buggy code:
A,B,C =map(str,input().split())


if A[-1] == B[0]:
    if B[-1] == C[0]:
        print("YES")
    else:
        print("NO")


Fixed code:
A,B,C =map(str,input().split())


if A[-1] == B[0]:
    if B[-1] == C[0]:
        print("YES")
    else:
        print("NO")

else:
    print("NO")
Buggy code:
a, b, c = input().split()
if a[0] == b[-1] and b[0] == c[-1]:
    print("YES")
else:
    print("NO")


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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print("YES")
else:
    print("NO")

Fixed code:
a,b,c = input().split()

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=input().split()
print(["NO","YES"][a[-1]==b[0] and b[-1]==c[1]])

Fixed code:
a,b,c=input().split()
print(["NO","YES"][a[-1]==b[0] and b[-1]==c[0]])
Buggy code:
a,b,c=input().split()
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO"

Fixed code:
a,b,c=map(str, input().split())

if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=map(int,input().split())
st="NO"
for i in range(a,b*a+1):
  if i%b==0:
    st="YES"
    break

print(st)




Fixed code:
a,b,c=map(int,input().split())
st="NO"
for i in range(1,b+1):
  temp=i*a
  if temp % b ==c:
    st="YES"
    break

print(st)
Buggy code:
a,b,c=map(int,input().split())
for i in range(1,101):
  if a*1%b == c:
    print("YES")
    exit()
print("NO")


Fixed code:
a,b,c=map(int,input().split())
for i in range(1,b+1):
  if a*i%b == c:
    print("YES")
    exit()
print("NO")
Buggy code:
A,B,C = map(int,input().split())

print('YES' if C % gcd(A,B) == 0 else 'NO')

Fixed code:
import math

A,B,C = map(int,input().split())

print('YES' if C % math.gcd(A,B) == 0 else 'NO')
Buggy code:
A,B,C = map(int,input().split())
for i in range(1,B+1):
    if A*i %B == C :
        print('YES')
        break
    else:
        print('NO')

Fixed code:
A,B,C = map(int,input().split())
for i in range(1,B+1):
    if A*i %B == C :
        print('YES')
        break
else:
    print('NO')
Buggy code:

a, b, c = map(int, input().split())

for i in range(1, b + 1):
    print((a * i) % b, a * i)
    if (a * i) % b == c:
        print("YES")
        exit()
print("NO") 

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

for i in range(b):
    if a * i % b == c:
        print('YES')
        exit()

print('NO')
Buggy code:
A,B,C = map(int,input().split())
for i in range(1,B+1):
    if A*i %B == C :
        print('YES')
        break
print('NO')

Fixed code:
A, B, C = map(int, input().split())
flg = 0
for i in range(A, B*A+1, 1):
    if (A*i) % B == C:
        print("YES")
        flg = 1
        break

if flg==0:
    print("NO")
Buggy code:
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter
import itertools


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
a, b, c = map(int, input().split())
for i in range(10**5):
    ans = a*i
    if ans & b == c:
        print('YES')
        exit()
print('NO')


Fixed code:
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
a, b, c = map(int, input().split())
for i in range(10**5):
    if a*i % b == c:
        print('YES')
        exit()
print('NO')
Buggy code:
import sys
a,b,c=map(int,input().split())

for i in range(10**9):
  if (a*i)%b==c:
    print("YES")
    sys.exit()
print("NO")

Fixed code:
import sys
a,b,c=map(int,input().split())

for i in range(10**5):
  if (a*i)%b==c:
    print("YES")
    sys.exit()
print("NO")
Buggy code:
a,b,c = list(map(int,input().split()))
multi_list = list()

for i in range(1,a+1):
    multi_list.append(i*a%b)
    
if a == 1:
    print("YES")
else:
    if c in multi_list:
        print("YES")
    else:
        print("NO")

Fixed code:
a,b,c = list(map(int,input().split()))
multi_list = list()

for i in range(1,b+1):
    multi_list.append(i*a%b)
    
if c in multi_list:
    print("YES")
else:
    print("NO")
Buggy code:
A, B, C = map(int, input().split())

valid = False
for i in range(0, B):
    if (i * A) % B == C:
        valid = True
        break
if valid:
    print("YES")
else:
    print("N0")

Fixed code:
A, B, C = map(int, input().split())

valid = False
for i in range(0, B):
    if (i * A) % B == C:
        valid = True
        break
if valid:
    print("YES")
else:
    print("NO")
Buggy code:
a, b, c = map(int, input().split())
r = 1
for i in range(1,b+1):
  r *= a
  if r % b == c:
    print("YES")
    break
  if i == b:
    if r % b != c:
      print("NO")

Fixed code:
a, b, c = map(int, input().split())
r = 0
for i in range(1,b+1):
  r = i*a
  if r % b == c:
    print("YES")
    break
  if i == b:
    if r % b != c:
      print("NO")
Buggy code:
a,b,c=map(int,input().split())
for i in range(1,b+1):
    if (a*i)%b==c:
        print("YES")
        break
    else:
        print("NO")
        break

Fixed code:
a,b,c=map(int,input().split())
for i in range(1,b+1):
    if (a*i)%b==c:
        print("YES")
        break
else:
    print("NO")
Buggy code:
A, B, C = [int(i) for i in input().split()]

for i in range(B):
    if (A*i)%B == C:
      	print('YES')
        break
else:
  	print('NO')

Fixed code:
A, B, C = [int(i) for i in input().split()]

for i in range(B):
    if (A*i)%B == C:
        print('YES')
        break
else:
    print('NO')
Buggy code:
a,b,c =  list(map(int, input().split()))

for i in range(b):
	if i*a%(b+1) == c:
		print('YES')
		sys.exit()

print('NO')

Fixed code:
a, b, c = map(int, input().split(" "))

for i in range(1, b+1):
    if (a*i)%b == c:
        print("YES")
        exit()
print("NO")
Buggy code:
# -*- coding utf-8 -*-

a,b,c=map(int,input().split())

for i in range(1000000):
    if (a*i-c)%b==0:
        print("YES")
    else:
        print("NO")


Fixed code:
# -*- coding utf-8 -*-

a,b,c=map(int,input().split())
ans="NO"
for i in range(1000000):
    if (a*i-c)%b==0:
        ans='YES'
        break
print(ans)
Buggy code:

ABC = input().split()
A=int(ABC[0])
B=int(ABC[1])
C=int(ABC[2])


count = 1000


for index in range(count+1):
    if (A*index)%B ==C:
        print("Yes")
        break
    elif index ==count:
        print("NO")

Fixed code:
ABC = input().split()
A=int(ABC[0])
B=int(ABC[1])
C=int(ABC[2])


count = A*B


for index in range(count+1):
    if (A*index)%B==C:
        print("YES")
        break
    elif index ==count:
        print("NO")
Buggy code:
a, b, c = map(int, input().split())

flg = 0

for i in range(100000000):
    if (i*a)%b = c:
        flg+=1
    break

if flg==0:
    print("NO")
else:
    print("YES")

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

flg = 0

for i in range(100000):
    if (i*a)%b == c:
        flg+=1
        break

if flg==0:
    print("NO")
else:
    print("YES")
Buggy code:
A,B,C=map(int,input().split())
s=0
for i in range(0,B+1):
    x=A*i//B
    if x==C:
        s=s+1
    else:
        s=s
if s!=0:
    print('YES')
else:
    print('NO')
        

Fixed code:
A,B,C=map(int,input().split())
s=0
for i in range(1,B+1):
    x=A*i%B
    if x==C:
        s=s+1
    else:
        s=s
if s!=0:
    print('YES')
else:
    print('NO')
Buggy code:
a, b, c = map(int, input().split())

amari = []

for i in range(0, 10000000):
    if a * i % b == c:
        print("YES")

    else:
        if a % b not in amari:
            amari.append(a % b)
        else:
            print("NO")



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

amari = []

for i in range(0, 10000000):
    d = a * i
    if d % b == c:
        print("YES")
        break

    else:
        if d % b not in amari:
            amari.append(d % b)
        else:
            print("NO")
            break
Buggy code:
# -*- coding: utf-8 -*-
import sys
(A,B,C) = map(int,input().split(" "))

x = A % B

print(C,x)

for i in range(B):
    if (A*i) % B == C:
        print('YES')
        sys.exit()
print('NO')


Fixed code:
# -*- coding: utf-8 -*-
import sys
(A,B,C) = map(int,input().split(" "))

for i in range(B):
    if (A*i) % B == C:
        print('YES')
        sys.exit()
print('NO')
Buggy code:
A, B, C = map(int, input().split())
r = set([])

temp = A % B

while temp not in r:
    r.add(temp)
    temp = temp * A % B

if C in r:
    print('YES')
else:
    print('NO')

Fixed code:
A, B, C = map(int, input().split())
r = set([])

temp = A % B

while temp not in r:
    r.add(temp)
    temp = (temp + A) % B

if C in r:
    print('YES')
else:
    print('NO')