qyliang/CodeNanoFix huggingface dataset:
Buggy code:
a, b, c = map(int,input().split())
A = []
for i in range(1,b+1):
    mod = a*i % b
    if mod in A:break
    A.append(mod)

A.sort()
if len(A) >= 2:
    i = A[1]
else:
    i = 0

if i == 0 and c == 0:
    print('Yes')
    exit()
elif i == 0 and c != 0:
    print('No')
    exit()

if c % i == 0:
    print('Yes')
else:
    print('No')

Fixed code:
a, b, c = map(int,input().split())
A = []
for i in range(1,b+1):
    mod = a*i % b
    if mod in A:break
    A.append(mod)

A.sort()
if len(A) >= 2:
    i = A[1]
else:
    i = 0

if i == 0 and c == 0:
    print('YES')
    exit()
elif i == 0 and c != 0:
    print('NO')
    exit()

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

Fixed code:
a,b,c=map(int,input().split())
amari=[]
for i in range(1,b+1):
    amari.append(a*i%b)
print("YES"if c in amari else "NO")
Buggy code:
a,b,c=map(int,input().split())
moda=a%b
keep=0
for i in range(0,10**6):
  if (moda*i)%b==c:
    keep=1
    print("YES")
    break
if keep==0:
  print("No")

Fixed code:
a,b,c=map(int,input().split())
moda=a%b
keep=0
for i in range(1,10**6):
  if (moda*i)%b==c:
    keep=1
    print("YES")
    break
if keep==0:
  print("NO")
Buggy code:

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

if a % 2 == 0:
    print("No")
else:
    for i in range(1,b+1):
        l.append((a * i) % b)
#    print(l)

    if l.count(c) != 0:
        print("YES")
    else:
        print("NO")


Fixed code:

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

#if a % 2 == 0:
#    print("NO")
#else:
for i in range(1,b+1):
    l.append((a * i) % b)

if l.count(c) != 0:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=map(int,input().split())
l=[]
for i in range(1,b+1):
    l.append((a+i)%b)
if l.count(0)>0:
    print('YES')
else:print('NO')


Fixed code:
a,b,c=map(int,input().split())
l=[]
for i in range(b):
    l.append((a*i)%b)
if l.count(c)>0:
    print('YES')
else:
    print('NO')
Buggy code:
A, B, C = map(int, input().split())
for i in range(1, 500):
    if (A * i) % B == C:
        print('YES')
else:
    print('NO')

Fixed code:
A, B, C = map(int, input().split())
for i in range(1, 500):
    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):
  a%b * 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())
lis = list(range(1, 100000))
AA =0
for i in lis:
    AA = A*i
    if AA%B == C:
        print('YES')
else:
    print('NO')

Fixed code:
A, B, C = map(int, input().split())
lis = list(range(1, 100000))
AA =0
for i in lis:
    AA = A*i
    if AA%B == C:
        print('YES')
        break
else:
    print('NO')
Buggy code:
a,b,c = map(int,input().split())
cnt = 0
for i in range(1,b+1):
    if a*i % b == c:
        cnt += 1
if cnt == 1:
    print("YES")
else:
    print("NO")

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

ans = 0

for i in range(1,B+1):
  if A*i % B == C:
    ans = 1

if ans == 1:
  print(YES)
else :
  print(NO)

Fixed code:
A,B,C = list(map(int,input().split()))
 
ans = 0
 
for i in range(1,B+1):
  if A*i % B == C:
    ans = 1
 
if ans == 1:
  print("YES")
else :
  print("NO")
Buggy code:
A, B, C = map(int, input().split())
flag = False

for i in range(A, B*A):
    if C == i % B:
        flag = True

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


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

for i in range(B):
    if C == i * A % B:
        flag = True

if flag:
    print('YES')
else:
    print('NO')
Buggy code:
a, b, c = [int(i) for i in 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 = [int(i) for i in input().split()]
for i in range(1, b+1):
    if a*i % b == c:
        print("YES")
        break
else: print("NO")
Buggy code:
# -*- coding: utf-8 -*-

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

ans = "NO"
for i in range(B+1)):
    res = A * i % B
    if res == C:
        ans = "YES"
        break

print(ans)

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

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

ans = "NO"
for i in range(B+1):
    res = A * i % B
    if res == C:
        ans = "YES"
        break

print(ans)
Buggy code:
# -*- coding: utf-8 -*-

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

mod = []
for i in range(max(B,C)):
    res = A * i % B
    if res == C:
        ans = "YES"
        print(i)
        break
    if res in mod:
        ans = "NO"
        break
    mod.append(res)

print(ans)

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

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

mod = []
for i in range(max(B,C)):
    res = A * i % B
    if res == C:
        ans = "YES"
        break
    if res in mod:
        ans = "NO"
        break
    mod.append(res)

print(ans)
Buggy code:
import sys

readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

for i in range(1, B+1):
    if A * i % B == C:
        print('Yes')
        quit()
print('No')

Fixed code:
import sys

readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

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

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

Fixed code:
a , b , c = map(int, input().split())
for i in range(b+10):
	if i == b+9:
		print('NO')
		break
	if a*(i+1)%b==c:
		print('YES')
		break
Buggy code:
import sys
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

A,B,C = read_int()

first = A % B

for i in range(1,B+2):
    rem = A*i % B
    if rem == C:
        print('YES')
        break
    elif i != 1 and rem == first:
        print('No')
        break

Fixed code:
import sys
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

A,B,C = read_int()

first = A % B

for i in range(1,B+2):
    rem = A*i % B
    if rem == C:
        print('YES')
        break
    elif i != 1 and rem == first:
        print('NO')
        break
Buggy code:
import itertools
A, B, C = map(int,input().split())

lst = []
for i in range(1,100):
    lst.append(A * i)


for i in range(1,5):
    for v in itertools.combinations(lst,i):
        print(v)
        if sum(v) % B == C:
            print('YES')
            exit()
print('NO')

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

lst = []
for i in range(1,100):
    lst.append(A * i)


for i in range(1,3):
    for v in itertools.combinations(lst,i):
        if sum(v) % B == C:
            print('YES')
            exit()
print('NO')
Buggy code:
A, B, C= map(int, input().split())

from collections import deque
loop = set()
l = deque([(7*i)%B for i in range(1, 150)])
for i in range(150):
    pop = l.popleft()
    if pop == C:
        print("YES")
        break
    if pop in loop:
        print("NO")
        break
    else:
        loop.add(pop)

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

from collections import deque
loop = set()
l = deque([(A*i)%B for i in range(1, 150)])
for i in range(150):
    pop = l.popleft()
    if pop == C:
        print("YES")
        break
    if pop in loop:
        print("NO")
        break
    else:
        loop.add(pop)
Buggy code:
a,b,c = [int(i) for i in input().split()]
arr = set()
ret = "NO"
r = a%b
if r==0:
    if c==0:
        ret="YES"
    else:
        pass
elif r==1:
    ret = "YES"
else:
    n = int(b/r)
    rr = r
    while not(rr in arr):
        print(arr,rr)
        if rr <= c and (c-rr)%r == 0:
            ret = "YES"
            break
        else:
            arr.add(rr)
            rr = (n*r+rr)%b
print(ret)



Fixed code:
a,b,c = [int(i) for i in input().split()]
arr = set()
ret = "NO"
r = a%b
if r==0:
    if c==0:
        ret="YES"
    else:
        pass
elif r==1:
    ret = "YES"
else:
    rr = r
    while not(rr in arr):
        # print(arr,rr)
        if rr <= c and (c-rr)%r == 0:
            ret = "YES"
            break
        else:
            arr.add(rr)
            n = int((b-rr)/r)
            n += 1 if (b-rr)%r != 0 else 0
            rr = (n*r + rr)%b
            # print(n,rr)
print(ret)
Buggy code:
a,b,c=map(int,input().split())

s=a

for i in range(b+1):
    if s%b==c:
        print("YES")

    else:
        s+=a
print("NO")


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

s=a

for i in range(b+1):
    if s%b==c:
        print("YES")
        exit()
    else:
        s+=a
print("NO")
Buggy code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b, c = i_map()

    print('YES' if a % 2 == b % 2 else 'NO')

if __name__ == '__main__':
    main()


Fixed code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b, c = i_map()

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

    print('NO')

if __name__ == '__main__':
    main()
Buggy code:
a,b,c=map(int,input().split())
amari=[]
while(True):
    if a%b==c:
        print("YES")
        break
    elif a%b in amari:
        print("NO")
        break
    else:
        amari.append(a%b)
        a+=a

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


Fixed code:
A, B, C = map(int, input().split())
flag = True
for i in range(1, B + 1):
    if A * i % B == C:
        print("YES")
        flag = False
        break
if flag:
    print("NO")
Buggy code:
# -*- coding: utf-8 -*-

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

for i in range(1, B + 1)
    if (A * i) % B == C:
        print('YES')
        exit()
        
print('NO')

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

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:
import sys
A, B, C = map(int,input())
for i in range(B):
    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(B):
    if A * i % B == C:
        print('YES')
        sys.exit()
print('NO')
Buggy code:
A,B,C=[int(i) for i in input().split()]

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

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

for i in range(B):
    if A*(i+1)%B==C:
        print('YES')
        break
else:
    print('NO')
Buggy code:
def f(A, B, C):
    ans = 'NO'
    for k in range(1, B + 1):
        if (k * A % B == C):
            ans = 'YES'
        return ans

if __name__ == "__main__":
    A, B, C = map(int, input().split())
    print(f(A, B, C))

Fixed code:
def f(A, B, C):
    ans = 'NO'
    for k in range(1, B + 1):
        if (k * A % B == C):
            ans = 'YES'
    return ans


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

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

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

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

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

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

cand = [(i+1)*A for i in range(B)]
rs = [c%B for c in cand]

print("YES" if 0 in rs else "NO")

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

cand = [(i+1)*A for i in range(B)]
rs = [c%B for c in cand]

print("YES" if C in rs else "NO")
Buggy code:
a,b,c = map(int,input().split())
ans = "NO"
for i in range(1,11):
    if (a*i)%b == c:
        ans = "YES"
print(ans)

Fixed code:
a,b,c = map(int,input().split())
ans = "NO"
for i in range(1,1+b):
    if (a*i)%b == c:
        ans = "YES"
print(ans)
Buggy code:
import sys
# input = sys.stdin.readline
from itertools import accumulate

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

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

main()

Fixed code:
import sys
# input = sys.stdin.readline
from itertools import accumulate

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

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

main()
Buggy code:
import math
a, b, c = map(int, input().split())
print("YES" if math.gcd(a,b)%c == 0 else "NO")

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

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

if C in li:
  print("YES")
else:
  print("NO")




Fixed code:
A, B, C = map(int, input().split())
li=[]
for i in range(1000000):
  c=A*(i+1)%B
  if c  in li:
    break
  li.append(c)

if C in li:
  print("YES")
else:
  print("NO")
Buggy code:
#-*- coding:utf-8 -*-
A,B,C=map(int,input().split())
number=0
record=[]
while number%B!=C:
  number+=A
  number%=B
  record.append(number)
  if number in record:
       print('NO')
       exit()
        
print('YES')


Fixed code:
#-*- coding:utf-8 -*-
A,B,C=map(int,input().split())
number=0
record=[]
while number%B!=C:
  number+=A
  number%=B
  if number in record:
       print('NO')
       exit()
  record.append(number)
        
print('YES')
Buggy code:
a,b,c=map(int,input().split())
x=0
for i in range(1,b+1):
    if i*a%==c:
        x+=1
if x==0:
    print('NO')
else:
    print('YES')

Fixed code:
a,b,c=map(int,input().split())
x=0
for i in range(1,b+1):
    if i*a%b==c:
        x+=1
if x==0:
    print('NO')
else:
    print('YES')
Buggy code:
a,b,c=map(int,input())
s=set()
while True:
  x=a%b
  if x==c:
    print("YES")
    break
  elif x in s:
    print("NO")
    break
  else:
    s.add(x)

Fixed code:
a,b,c=map(int,input().split())
a_=a
s=set()
while True:
  x=a_%b
  if x==c:
    print("YES")
    break
  elif x in s:
    print("NO")
    break
  else:
    s.add(x)
  a_+=a
Buggy code:
A,B,C = [int(i) for i in input().split()]
Flag = False

for i in range(1,B+1):
    D = i*A % B
    if D = C:
        Flag = True
        break

if Flag == True:
    print('YES')
else:
    print('NO')


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

for i in range(1,B+1):
    D = i*A % B
    if D == C:
        Flag = True
        break

if Flag == True:
    print('YES')
else:
    print('NO')
Buggy code:
import sys
input = sys.stdin.readline
A,B,C=map(int,input().rstrip().split())
for i in range(B):
    if (i*(A%B))% B == C:
        print("YES")
        return
print("NO")

Fixed code:
import sys
input = sys.stdin.readline
A,B,C=map(int,input().rstrip().split())
for i in range(B):
    if (i*(A%B))% B == C:
        print("YES")
        exit()
print("NO")
Buggy code:
a,b,c = map(int,input().rstrip().split())
ans = False
for i in range(b):
  if(a*i%b==c):
    print("YES")
    ans = True
    
if(not(ans)):
  print("NO")

Fixed code:
a,b,c = map(int,input().rstrip().split())
ans = False
for i in range(b):
  if(a*i%b==c and not(ans)):
    print("YES")
    ans = True
    
if(not(ans)):
  print("NO")
Buggy code:
a, b, c = map(int, input().split())

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

print("NO")

Fixed code:
a, b, c = map(int, input().split())
for i in range(1,10000000):
    if a*i % b == c:
        print("YES")
        exit()
print("NO")
Buggy code:
#abc056 b 
a,b,c=map(int,input().split())
num=[]
i=1
n=a
while True:
    n=n*i 
    x=n%b 
    if x not in num:
        num.append(x)
    else:
        break
if c in x:
    print("YES")
else:
    print("NO")

Fixed code:
#abc056 b
a,b,c=map(int,input().split())
num=[]
i=1
n=a
while True:
    n=a*i
    x=n%b
    if x not in num:
        num.append(x)
    else:
        break
    i+=1

if c in num:
    print("YES")
else:
    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:
    continue
print("NO")

Fixed code:
a,b,c=map(int, input().split())
for i in range(1,b+2):
    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):
    if A*i%B==C:
        print("YES")
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())

flag = 0
for i in range(100):
  if a*(i+1) <= 100:
    aa = a*(i+1)
    if aa % b == c:
      print("YES")
      flag = 1
      break
if flag == 0:
  print("NO")

Fixed code:
a,b,c = map(int, input().split())
 
flag = 0
for i in range(10000):
  if a*(i+1) <= a*b:
    aa = a*(i+1)
    if aa % b == c:
      print("YES")
      flag = 1
      break
if flag == 0:
  print("NO")
Buggy code:
a,b,c = map(int,input().split())
ans = "NO"
for i in range(1,b+1):
    if a%i == c:
        ans = "YES"
        break

print(ans)


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


Fixed code:
A,B,C = [int(i) for i in input().split()]
D = max(A,B)
for i in range(1,D+1):
    if A * i % B == C:
        print("YES")
        break
    if A * i % B != C and i == D:
        print("NO")
Buggy code:
A,B,C = map(int,input().split())
ans = False
for i in range(1,1000):
    K = i * A
    if(K % B == C):
        ans = True
        break
if(ans):
    print("YES")
else:
    print("No")

Fixed code:
A,B,C = map(int,input().split())
ans = False
for i in range(1,1000):
    K = i * A
    if(K % B == C):
        ans = True
        break
if(ans):
    print("YES")
else:
    print("NO")
Buggy code:
A, B, C = (int(i) for i in input().split())

AA = [A*(i+1) for i in range(B)]

flag = 0

for i in AA:
    if i % B == 0:
        flag = 1
        print("YES")
        break

if flag == 0:
    print("NO")

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

AA = [A*(i+1) for i in range(B)]

flag = 0

for i in AA:
    if i % B == C:
        flag = 1
        print("YES")
        break

if flag == 0:
    print("NO")
Buggy code:
A,B,C = map(int,input().split())

D = A % B
M = D
ok = False
for _ in range(B+1):
  if M == C:
    ok = True
	break
    
  M = (M + D) % B
  
if ok:
  print('YES')
else:
  print('NO')

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

D = A % B
M = D
ok = False
for _ in range(B+1):
  if M == C:
    ok = True
    break
    
  M = (M + D) % B
  
if ok:
  print('YES')
else:
  print('NO')
Buggy code:
a,b,c=map(int,input().split())
ch=0
for x in range(b):
  if (x*a)//b==c:
    ch+=1
    
if ch>0:
  print('YES')
else:
  print('NO')

Fixed code:
a,b,c=map(int,input().split())
ch=0
for x in range(b):
  if (x*a)%b==c:
    ch+=1
    
if ch>0:
  print('YES')
else:
  print('NO')
Buggy code:
A,B,C = map(int,input().split())
for i in range(A,A*B+1):
  if 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(b):
    q, r = divmod(a+i, b)
    if r == c:
        print('YES')
        exit()
print('NO')

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

for i in range(b):
    q, r = divmod(a*i, b)
    if r == c:
        print('YES')
        exit()
print('NO')