Problem:
 Score : 200 points    Problem Statement We ask you to select some number of positive integers, and calculate the sum of them.  It is allowed to select as many integers as you like, and as large integers as you wish.
You have to follow these, however: each selected integer needs to be a multiple of A , and you need to select at least one integer.  Your objective is to make the sum congruent to C modulo B .
Determine whether this is possible.  If the objective is achievable, print YES . Otherwise, print NO .      Constraints  1 ≤ A ≤ 100  1 ≤ B ≤ 100  0 ≤ C < B         Input Input is given from Standard Input in the following format:  A  B  C       Output Print YES or NO .        Sample Input 1 7 5 1      Sample Output 1 YES  For example, if you select 7 and 14 , the sum 21 is congruent to 1 modulo 5 .       Sample Input 2 2 2 1      Sample Output 2 NO  The sum of even numbers, no matter how many, is never odd.       Sample Input 3 1 100 97      Sample Output 3 YES  You can select 97 , since you may select multiples of 1 , that is, all integers.       Sample Input 4 40 98 58      Sample Output 4 YES       Sample Input 5 77 42 36      Sample Output 5 NO

Solution (Python):
import sys
A, B, C = map(int, input().split())

flag = [0] * (B+1)
i = 0

while True:
    i = (i + A) % B
    if i == C:
        break
    if flag[i] == 0:
        flag[i] = 1
    else:
        print('NO')
        sys.exit()

print('YES')

Solution (Python):
A, B, C = map(int, input().split())
a = A
result = 'NO'

for _ in range(10001):
    if A%B == C:
        result = 'YES'
        break
    A += a

print(result)

Solution (Python):
A, B, C = map(int, input().split())
a = A
count = 10001
result = 'NO'

while count > 0:
    if A%B == C:
        result = 'YES'
        break
    A += a
    count -= 1

print(result)

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

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

Solution (Python):
def gcd(n,m):
    while n > 0:
        a = n
        n = m % n
        m = a
    return m

A,B,C = map(int,input().split(" "))
print("NO" if C%gcd(A,B) else "YES")

Solution (Python):
v = input().split(" ")

a = int(v[0])
b = int(v[1])
c = int(v[2])

amari = []

tmp1 = 0
tmp2 = 0

for i in range(1, b + 1, 1):
    
    tmp1 += a
    
    amari.append(tmp1 % b)

if c in amari:
  print("YES")
else:
  print("NO")

Solution (Python):
a,b,c=map(int,input().split())
f=False
for i in range(1,b+1):
    if i*a%b == c:
        f=True
print('YES' if f else 'NO')

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

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

print('NO')

Solution (Python):
A,B,C = [int(x) for x in input().split()]
li = []
n = 1
while(True):
    i=A*n%B
    if(i in li):
        break
    else:
        li.append(i)
        n+=1
if(C in li):
    print('YES')
else:
    print('NO')

Solution (Python):
a,b,c=map(int,input().split())
ans=0
for i in range(1,b+1):
    if (a*i)%b==c:
        ans=1
print('YES' if ans==1 else 'NO')

Solution (Python):
a,b,c=map(int,input().split())
def gcd(a,b):
    r=a%b
    while r!=0:t=b;b=r;r=t%b
    return b
print(c%gcd(a,b)and"NO"or"YES")

Solution (Python):
a,b,c=map(int,input().split())
i=1
r=[]
while a*i%b not in r:
  r.append(a*i%b)
  i+=1
print('NYOE S'[any(c%q==0for q in r if q>0)::2])

Solution (Python):
a, b, c = map(int,input().split())
flg = False
for i in range(a, a*b+1, a):
  if i % b == c:
    flg = True
    break
if flg == True:
  print("YES")
else:
  print("NO")

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

ans = 'NO'
for i in range(1, b+1):
    if a * i % b == c:
        ans = 'YES'
        break

print(ans)

Solution (Python):

a, b, c = map(int, input().split())
for i in range(1, b):
    if (a*i)%b == c:
        print("YES")
        break
    if i==b-1:
        print("NO")

Solution (Python):
a,b,c = map(int,input().split())
ans = 'NO'

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

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

mods = set()
for i in range(1, 101):
    n = i*A % B
    if n == C:
        print('YES')
        break
    elif not n in mods:
        mods.add(n)
    else:
        print('NO')
        break

Solution (Python):

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

Solution (Python):


a,b,c = map(int, input().split())
ans = False
for i in range(1,b+2):
  if i*a%b==c:
    ans = True

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

Solution (Python):
a, b, c = map(int, input().split())
n = 1
while not a * n % b == 0:
    if a * n % b == c:
        print('YES')
        exit()
    n += 1
else:
    if c == 0:
        print('YES')
    else:
        print('NO')

Solution (Python):
import sys
from collections import Counter

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

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

print('NO')

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

is_YES = False
for i in range(0, a*b+1, a):
    if i%b == c:
        is_YES = True
        break

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

Solution (Python):
a,b,c=map(int,input().split())
ans="NO"

for i in range (100000):
    if a*i%b==c:
        ans="YES"
        break

print(ans)

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

sum_A = A
for i in range(B):
    sum_A += A
    if sum_A % B == C:
        print("YES")
        break
else:
    print("NO")

Solution (Python):

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


def mymod(x, y):
    return x % y

def submit():
    a, b, c = read_input()

    mods = list(set([mymod(i*a, b) for i in range(1, b)]))
    mods.sort()

    while True:
        temp = []
        for i in range(len(mods)):
            for j in range(len(mods)):
                temp.append(mymod(mods[i] + mods[j], b))
        new_mods = list(set(mods + temp))
        new_mods.sort()

        if mods == new_mods:
            break

        mods = new_mods

    if c in mods:
        print('YES')
    else:
        print('NO')



if __name__ == '__main__':
    submit()

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

ans = False
for i in range(A + 1):
    if (B * i + C) % A == 0:
        ans = True
        break
print('YES' if ans else 'NO')

Solution (Python):
A,B,C = map(int,input().split())
found = False
for i in range(1,B+1):
    if A * i % B == C:
        found = True
if found == True:
    print("YES")
else:
    print("NO")

Solution (Python):
A,B,C = map(int,input().split())
i = 1
ans = "NO"
modlist = []
while True:
    if (B * i + C) % A == 0:
        ans = "YES"
        break
    else:
        modlist.append((B * i + C) % A)
        i += 1
    if len(modlist) != len(set(modlist)):
        break
print(ans)

Solution (Python):

A, B, C = map(int, input().split())
ok = False
for i in range(1,B+1):
    if i*A % B ==C:
        ok = True
if ok:
    print("YES")
else:
    print("NO")

Solution (Python):
a, b, c = map(int, input().split())
f=False
for i in range(b):
    if a*i%b==c:
        f=True
print('YES' if f else 'NO')

Solution (Python):
from fractions import gcd
A, B, C = map(int, input().split())
if C % gcd(A, B) == 0:
	print("YES")
else:
	print("NO")

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

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

print("NO")

Solution (Python):
A, B, C = map(int, input().split())
x = 0
f = False
for i in range(B):
  x = (x + A) % B
  if x == C:
    f = True
if f or C % A == 0:
  print('YES')
else:
  print('NO')

Solution (Python):
def main():
    input = sys.stdin.readline
    try:
        a, b, c = map(int, input().split())
        for i in range(a, a * b, a):
            if i % b == c:
                print("YES")
                break
        else:
            print("NO")

    finally:
        input = None

import sys; sys.setrecursionlimit(50000)
if __name__ == "__main__":
    main()

Solution (Python):
a, b, c = [int(n) for n in input().split()]

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

Solution (Python):
[A,B,C] = list(map(int,input().split()))
ans = "NO"
for i in range(B):
    if A*i%B == C:
        ans = "YES"
print(ans)

Solution (Python):

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

def func(A, B, C):
    i = 1
    sum = 0
    while(True):
        if i%100 == 0:
            break
        sum += A
        i+=1
        if sum%B==C:
            print('YES')
            return
    print('NO')

func(A,B,C)

Solution (Python):


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

n = [i * a % b for i in range(b + 1)]

print('YES' if c in n else 'NO')

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

ans = 'NO'

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

print(ans)

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

rem = []
flg = 0
ct = 1
while True:
    tmp = ct*A
    if tmp % B == C:
        flg = 1
        break
    else:
        if tmp % B not in rem:
            rem.append(tmp % B)
        else:
            break
    ct += 1

print('YES' if flg else 'NO')

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b,c = f()
    a = a%b
    c = c%b
    for i in range(b):
        if (a*i)%b == c:
            print('YES')
            return
    
    print('NO')

solve()

Solution (Python):
a,b,c=map(int,input().split())
def gcd(x, y):
    while x % y != 0:
        x, y = y, x % y
    return y
if a<b:a,b=b,a
print("YES" if c%gcd(a,b)==0 else "NO")

Solution (Python):
a,b,c=map(int,input().split())
ans=0
for i in range(b):
  if (i*a)%b==c:
    ans+=1
print("YES" if ans>0 else "NO")

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

Solution (Python):
a,b,c=map(int,input().split())
ans='NO'
A=[]
for i in range(10001):
  A.append((a*i-c)%b)
  if(i>3)and(A[0]==A[-1]):
    break
  if (a*i-c)%b==0:
    ans='YES'
    break
print(ans)

Solution (Python):
A,B,C=map(int,input().split())
print("YES"if C in [A*i%B for i in range(B)]else"NO")

Solution (Python):
import fractions

a,b,c = map(int, input().split())
if a % b == 0:
  if c == 0:
    print("YES")
  else:
    print("NO")
else:
  GCD = fractions.gcd(a,b)
  if c % GCD == 0:
    print("YES")
  else:
    print("NO")

Solution (Python):


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)

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

Solution (Python):
a,b,c = map(int,input().split())
for i in range(100):
    if a*i % b == c:
        print("YES")
        break
else:
    print("NO")

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

x=a
for i in range(1000):
    if x%b==c:
        print("YES")
        exit()
    else:
        x+=a
print("NO")

Solution (Python):
A,B,C = map(int,input().split())
flag = 1
for i in range(100):
    if (A*i)%B == C:
        flag = 0
ans = ["YES","NO"]
print(ans[flag])

Solution (Python):
a,b,c=map(int,input().split())
l=[]
m=1
while 1:
    i=(a*m)%b
    if i==c:
        print("YES")
        break
    elif i in l:
        print("NO")
        break
    else:
        l.append(i)
        m+=1

Solution (Python):
a,b,c=map(int,input().split())
d=a%b
if d==0:
    if c==0:
        A=True
    else:
        A=False
else:
    for i in range(1,max(a,b)):
        if (i*d)%b==c:
            A=True
            break
        else:
            A=False
if A:
    print('YES')
else:
    print('NO')

Solution (Python):
a, b, c = [int(item) for item in input().split()]
for i in range(b):
    if (a * i) % b == c:
        print("YES")
        exit()
print("NO")

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



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

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

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

Solution (Python):
a, b, c = map(int, input().split())
for bi in range(1, b + 1):
    if a * bi % b == c:
        print('YES')
        exit()
print('NO')

Solution (Python):
A, B, C = map(int, input().split())
i = 0
while True:
    if (i * B + C) % A == 0:
        print('YES')
        break
    else:
        if i > 0 and (i * B) % A == 0:
            print('NO')
            break
        i += 1

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    a, b, c = (int(_) for _ in input().split())
    i = 1
    ans = 'NO'
    while i<b:
        if(a*i % b == c):
            ans = 'YES'
            break
        i+=1
            
    print(ans)
    
if __name__ == '__main__':
    main()

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

sumA = 0
i = 1
ans = False

while sumA <= A * B + C :
    sumA += i * A
    if sumA % B == C :
        ans = True
        break
    

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

Solution (Python):
a,b,c=map(int,input().split())
list=[0]*100
for i in range(a*b):
  list[a*i%b] += 1
if list[c] >= 1:
  print('YES')
else:
  print('NO')

Solution (Python):
A,B,C=map(int,input().split())
for i in range(1,B):
    if A*i%B==C:
        print("YES")
        exit()
            
print("NO")

Solution (Python):
def gcd(x, y):
    while y:
        x, y = y, x%y
    return x

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

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

Solution (Python):
A, B, C = map(int, input().split())
flg = 0
for i in range(A, A*B+1):
    if i % A == 0 and i % B == C:
        flg = 1
        break
print('YES') if flg == 1 else print('NO')

Solution (Python):
a,b,c=map(int,input().split())
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
if c==0:
    print("YES")
elif c%gcd(a,b)==0 and c!=0:
    print("YES")
else:
    print("NO")

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

amaris = []

flag = False
count = 1
tmp = A
while True:
    amari = tmp % B
    if C == amari:
        flag = True
        break
    if amari in amaris:
        break
    amaris.append(amari)
    count += 1
    tmp = A * count

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

Solution (Python):
a, b, c = map(int, input().split(' '))

flag = False
for i in range(b):
    if a * i % b == c:
        flag = True
if flag:
    print('YES')
else:
    print('NO')

Solution (Python):
A, B, C = map(int, input().split())
R = {i: False for i in range(B)}
X = 0
while True:
    X += A
    r = X % B
    if r == C:
        print("YES")
        exit()
    if R[r]:
        print("NO")
        exit()
    R[r] = True

Solution (Python):
A,B,C = map(int,input().split())
As = [A*i for i in range(1,100)]
if all([a%B!=C for a in As]):
    print("NO")
else:
    print("YES")

Solution (Python):
a, b, c = map(int, input().split())
a = a % b
t = a
ans = "NO"
for i in range(b):
    t += a
    if (t % b == c):
        ans = "YES"
print(ans)

Solution (Python):
import sys

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

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

    return 'NO'


if __name__ == '__main__':
    print(main())

Solution (Python):
a, b, c = map(int, input().split())
for i in range(1, b + 1):
    if a * i % b == c:
        print('YES')
        exit()
print('NO')

Solution (Python):
a, b, c = map(int, input().split())
for i in range(100):
    if (a * i % b == c):
        print("YES")
        exit()
print("NO")

Solution (Python):
import sys
a, b, c = map(int, raw_input().split())
for i in range(1,b+1):
	total = a * i
	if total % b == c:
		print 'YES'
		sys.exit()
print 'NO'

Solution (Python):
a,b,c = map(int,input().split())
found = False
for i in range(1,b+1):
    if (a * i) % b == c:
        found = True
if found :
    print("YES")
else:
    print("NO")

Solution (Python):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

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

print("YES" if c % x == 0 else "NO")

Solution (Python):
a, b, c = map(int, input().split())
s=0
for i in range(1, b+1):
    if (a * i) % b == c:
        s = 1
        break
print("YES" if s else "NO")

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

a_mod_b = a % b

flg = False
while a_mod_b > 0:
	a_mod_b = ( a_mod_b + a ) % b
	if a_mod_b == c :
		flg = True
		break
if flg:
	print("YES")
else:
	print("NO")

Solution (Python):
a,b,c=map(int,input().split())
ans='NO'
for i in range(10**5):
    if (c+b*i)%a==0:
        ans='YES'
        break
print(ans)

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

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

Solution (Python):
a,b,c=map(int,input().split())
flag=False
for i in range(b):
    if a*i%b==c:
        flag=True
print("YES" if flag else "NO")

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

A_mod = []
i = 1
while 1:
    x = (A*i)%B
    if x in A_mod:
        break
    A_mod.append(x)
    i += 1

A_mod.remove(0)
A_mod = sorted(A_mod)
s = 0
for a in A_mod:
    while s < C:
        s += a

if s == C:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
A, B, C = map(int, input().split())
for i in range(B):
	if A * i % B == C:
		print("YES")
		break
else:
	print("NO")

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

Solution (Python):
a,b,c=map(int,input().split())
ans=0
flag=0
for i in range(b):
  ans+=a
  if(ans%b==c):
    flag=1

if(flag==1):
  print("YES")
else:
  print("NO")

Solution (Python):


a,b,c=map(int,input().split())
for i in range(a,0,-1):
  if a%i==0 and b%i==0:
    gcd=i
    break
if c%gcd==0:
  print("YES")
else:
  print("NO")

Solution (Python):
a, b, c = map(int, input().split())
for i in range(1000000):
    if (a*i)%b==c:
        print("YES")
        break
else:
    print("NO")

Solution (Python):
a,b,c=map(int,input().split())
for i in range(a,0,-1):
  if a%i==0 and b%i==0:
    gcd=i
    break
if c%gcd==0:
  print("YES")
else:
  print("NO")

Solution (Python):

from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


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

a,b,c = LI()
x = a
f = [0 for i in range(b)]
while 1:
    if a%b == c:
        print("YES")
        quit()
    if f[a%b]:
        print("NO")
        quit()
    f[a%b] = 1
    a += x

""""
n,T = LI()
ans = 0
t = LI()
for i in range(n-1):
    ans += min(T,t[i+1]-t[i])
ans += T
print(ans)
"""


"""
n,w = LI()
g = LIR(n)
l = [[] for i in range(4)]
for W,v in g:
    l[W-g[0][0]].append(v)
    l[W-g[0][0]].sort(reverse = True)
l0 = len(l[0])
l1 = len(l[1])
l2 = len(l[2])
l3 = len(l[3])
for i in range(l0-1):
    l[0][i+1] += l[0][i]
l[0].insert(0,0)
for i in range(l1-1):
    l[1][i+1] += l[1][i]
l[1].insert(0,0)
for i in range(l2-1):
    l[2][i+1] += l[2][i]
l[2].insert(0,0)
for i in range(l3-1):
    l[3][i+1] += l[3][i]
l[3].insert(0,0)
ans = 0
for i in range(l0+1):
    for j in range(l1+1):
        for k in range(l2+1):
            for m in range(l3+1):
                if i*g[0][0]+j*(g[0][0]+1)+k*(g[0][0]+2)+m*(g[0][0]+3) <= w:
                    ans = max(ans,l[0][i]+l[1][j]+l[2][k]+l[3][m])
print(ans)
"""

Solution (Python):
def choose_integers(A: int, B: int, C: int) -> bool:
    n = A
    for _ in range(B):
        n %= B
        if n == C:
            return True
        n = (n + A)
    return False


if __name__ == "__main__":
    A, B, C = map(int, input().split())
    yes = choose_integers(A, B, C)
    print('YES' if yes else 'NO')

Solution (Python):
A, B, C = map(int, input().split())
mods = set()
i = 1
while True:
    mod = (A*i)%B
    if mod in mods:
        break
    mods.add(mod)
    i += 1

print("YES" if C in mods else "NO")

Solution (Python):
A,B,C=map(int,input().split())
num=A*B
p=0
for i in range(num+1):
    r=A*i-C
    if r%B==0:
        print('YES')
        break
    else:
        p+=1
if p==num+1:
    print('NO')

Solution (Python):
a, b, c = map(int, input().split())
ans = "NO"
for i in range(a, a*b+1, a):
    if c == i % b:
        ans = "YES"
        break

print(ans)

Solution (Python):
A, B, C = map(int, input().split())
ans = "NO"
for i in range(1, B+1):
	if (A*i)%B == C:
		ans = "YES"
print(ans)

Solution (Python):
a, b, c = map(int, input().split())
for n in range(1, b+1):
    if a * n % b == c:
        print('YES')
        break
else:
    print('NO')

Solution (Python):



A,B,C=map(int,input().split())
ans=False
for x in range(B):
	if x*A%B==C:
		ans=True
print('NYOE S'[ans::2])

Solution (Python):
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")

Solution (Python):
A, B, C = list(map(int, input().split()))
for i in range(100):
    if (A * i) % B == C:
        print("YES")
        exit()
print("NO")

Solution (Python):
A, B, C = map(int, input().split())
ans = "NO"
for i in range(1,B+1):
    if A * i % B == C:
        ans = 'YES'
print(ans)

Solution (Python):

import sys
A,B,C= map(int,input().split())
for i in range(1,B):
    if A*i%B ==C:
        print('YES')
        exit()
print('NO')

Solution (Python):
import sys
A,B,C = map(int, input().split())
for i in range(0, B+1):
    if (A*i)%B == C:
        print("YES")
        sys.exit()
print ("NO")

Solution (Python):
a,b,c=map(int,input().split())
ans="NO"
for i in range(b):
  if (a*(i+1))%b==c:ans="YES"
print(ans)

Solution (Python):
a, b, c = map(int, input().split())
br = 0
for i in range(100):
    if (i + 1) * a % b == c:
        print('YES')
        br = 1
        break
if br == 0:
    print('NO')

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

i= 1
m=[]
while True:
    w = (b*i + c) % a
    if w == 0:
        print ("YES")
        break
    elif w in m:
        print ("NO")
        break
    else:
        m.append(w)
        i+=1

Solution (Python):
a,b,c = map(int,input().split())
for i in range(a,a*b,a):
    if i % b == c:
        print('YES')
        exit()
else:
    print('NO')

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

Solution (Python):
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)
    

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


if c % gcd(max(a, b), min(a, b)) == 0:
    ans = 'YES'
else:
    ans = 'NO'
print(ans)

Solution (Python):

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

total = 0
mod_roop_list = []

def roop_checker(candidate):
    a_str = ''
    candidate_str = ''.join(candidate)
    for can in candidate:
        a_str = a_str + str(can)
        if a_str*5 in candidate_str:
            return True
    else:
        return False

while True:
    total += a
    if total%b == c:
        print('YES')
        break

    mod_roop_list.append(str(total%b))
    if roop_checker(mod_roop_list):
        print('NO')
        break

Solution (Python):
a,b,c=map(int,input().split())
l=0
for i in range(b+1):
    l=a*i
    if l%b==c:
        print("YES")
        exit()
print("NO")

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

def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
    
if C % gcd(A,B) == 0:
    print("YES")
else:
    print("NO")

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

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

print('NO')

Solution (Python):
def gcd(a,b):
  if b==0:
    return a
  return gcd(b,a%b)
a,b,c=map(int,input().split())
if c%gcd(a,b):
  print("NO")
else:
  print("YES")

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

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

print('NO')

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

rs = []

for i in range(1, B+3):
    r = A*i % B
    if r == C:
        print("YES")
        exit()
    if r in rs:
        print("NO")
        exit()
    rs.append(r)
print("NO")

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

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

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

print('NO')

Solution (Python):
a,b,c=map(int,input().split())
d=False
for i in range(1,b+1):
  if a*i%b==c:
    d=True
    break
if d==True:
  print("YES")
else:
  print("NO")

Solution (Python):
a,b,c=map(int,input().split())
l=[]
for i in range(1,min(a,b)+1):
  if a%i==0 and b%i==0:
    l.append(i)
if l==[]:
  print("YES")
elif c%l[-1]==0:
  print("YES")
else:
  print("NO")

Solution (Python):
a,b,c=map(int,input().split())
print("YES" if any((a*i)%b==c for i in range(1,b+1)) else "NO")

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

def gcd(x,y):
	if y == 0:
		return x
	else:
		return gcd(y,x%y)   
      
if c % gcd(a,b) == 0:
	print('YES')
    
else:
	print('NO')

Solution (Python):
A, B, C = map(int, input().split())
for n in range(1,B+1):
    if A*n%B==C:
        print("YES")
        break
    if n==B:
        print("NO")

Solution (Python):
a,b,c=map(int,input().split())
res='NO'
for i in range(1,b+1):
    if (a*i)%b==c:
        res='YES'
        break
print(res)

Solution (Python):
A, B, C = list(map(int, input().split()))
amari = A%B
ptn = [amari]
tmp = amari
while 1:
    tmp = (amari + tmp)%B
    if tmp in ptn:
        if C in ptn:
            print('YES')
            exit()
        else:
            print('NO')
            exit()
    else:
        ptn.append(tmp)

Solution (Python):
a,b,c = (int(i) for i in input().split())
for i in range(1,b):
    if a*i%b == c:
        print("YES")
        exit()
    
print("NO")

Solution (Python):
A,B,C = map(int,input().split())
x = max(A,B)
y = min(A,B)
while y != 0: 
  x,y=y,x%y 
if C%x==0:
    print('YES')
else:
    print('NO')

Solution (Python):
A,B,C=map(int,input().split(' '))
mods=[]
for i in range(B):
  mods.append((A*(i+1))%B)
print('YES') if C in mods else print('NO')

Solution (Python):
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

Solution (Python):
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')

Solution (Python):
def gcd(x, y):
    if x > y:
        x, y = y, x
    if x == 0:
        return y
    else:
        return gcd(y%x, x)

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

if gcd(a, b) == 1:
    print("YES")
else:
    if c%gcd(a, b) == 0:
        print("YES")
    else:
        print("NO")

Solution (Python):
A, B, C = map(int, input().split())
for n in range(1, B+1):
    if A*n%B==C:
        print("YES")
        break
    if n==B:
        print("NO")

Solution (Python):
A, B, C = map(int, input().split())
st = set()
for i in range(0, B):
    if (i*A) % B in st:
        break
    st.add((i*A) % B)
if C in st:
    print("YES")
else:
    print("NO")

Solution (Python):
a,b,c=map(int,input().split());print("NYOE S"[c in[a*s%b for s in range(99)]::2])

Solution (Python):
def main():
    A, B, C = map(int, input().split())
    for i in range(B):
        if (A * i) % B == C:
            print("YES")
            return
    print("NO")


if __name__ == "__main__":
    main()

Solution (Python):
A,B,C = map(int, input().split())
for i in range(1,B+1):
    a = (A*i)%B
    if a == C:
        print('YES')
        exit()
print('NO')

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

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

Solution (Python):
a,b,c = map(int,input().split())
count = 0
for i in range(1,101):
    if a*i % b == c:
        count += 1
if count > 0:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
A, B, C = list(map(int, input().split()))
flag = False

for i in range(1,B+1):
    if i*A % B == C:
        flag = True
        break
    
print("YES" if flag else "NO")

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

i = 0
while(1):
    if (A * i) % B == C:
        print('YES')
        break
    elif i > B:
        print('NO')
        break
    else:
        i += 1