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

seen = {}
find_flag = 0
for i in range(1, 100):
    rest = A * i % B
    if rest == C:
        find_flag += 1
        break
    if seen.get(rest):
        break
    else:
        seen[rest] = 1

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

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

Solution (Python):

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

Solution (Python):
def gcd(a,b):
    return a if b==0 else 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(A*B):
    if i % A != 0:
        continue
    if i % B == C:
        print('YES')
        exit()
print('NO')

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

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

ans = 'NO'
	
for i in range(200):
	if (a*i-c)%b == 0:
		ans = 'YES'

print(ans)

Solution (Python):
a,b,c=map(int,input().split())
x=1
count=0
for i in range(10**4):
    if x*a-((x*a)//b)*b==c:
        print('YES')
        break
    else:
        x+=1

if x==10**4+1:
    print('NO')

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
mod = 10**9+7


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, 100000):
    if (A*i)%B == C:
        print("YES")
        exit()

print("NO")

Solution (Python):

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

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

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

Solution (Python):
def gcd(a, b):
    while b: a, b = b, a % b
    return abs(a)
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())
cnt = 0
for i in range(1, b + 1):
    if (a * i) % b == c:
        cnt += 1

print('YES' if cnt >= 1 else 'NO')

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

Solution (Python):
a,b,c=map(int,input().split())
dp=[False]*b
aa=a
while True:
  if not dp[aa%b]:
    dp[aa%b]=True
    aa+=a
  else:
    break
print(("NO","YES")[dp[c]])

Solution (Python):
""" sum(kA)%B = C"""
a,b,c = map(int,input().split())
mod = []
k=0
s = a
while(k<100):
    if s%b == c:
        print("YES")
        exit()
    k+=1
    s=k*a
    if k>=100:
        print("NO")
        exit()

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

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

N=[]
x=0
while True:
    if x%b not in N:
        N.append(x%b)
    else:
        break
    x=x+a
    
if c in N:
    print("YES")
else:
    print("NO")

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

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

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

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

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

print('NO')

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

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

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

Solution (Python):
def gcd(a,b):
    if a>b :
        while b!=0:
            a,b = b,a%b
        return a
    else :
        while a!=0:
            a,b = b%a,a
        return b
def examB():
    A, B, C = LI()
    cur = gcd(A,B)
    if C%cur==0:
        ans = "YES"
    else:
        ans = "NO"
    print(ans)

import sys
import copy
import bisect
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

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

Solution (Python):

a, b, c = [int(s) for s in input().split()]
is_able = 'NO'

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

print(is_able)

Solution (Python):



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


ans = False
for i in range(B):
    if (A * i) % B == C:
        ans = True
        break


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

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

Solution (Python):
a,b,c=map(int,input().split())
al=[]
for i in range(100):
    al.append(a)
    if sum(al)%b==c:
        print("YES")
        exit()
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 = [int(x) for x in input().split()]

fin = False
for i in range(2, 100):
    ans = i * a
    if ans % b == c:
        print("YES")
        fin = True
        break
if fin==False:
    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())
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())
r = False
for i in range(1,b+1):
  if (a*i)%b==c:
    r =True
print('YES' if r else 'NO')

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

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

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

r = A % B
div_list = []
for i in range(B):
    div_list.append(r*i)

div_array = np.array(div_list) % B

if np.any(C in div_array):
    print('YES')
else:
    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):
import sys
input = sys.stdin.readline


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")


if __name__ == '__main__':
    main()

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

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

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

total = 0
for i in range(max(a, b)):
  total = total + a
  if total % b == c:
    print('YES')
    exit()
print('NO')

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

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

print(ans)

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

Solution (Python):
A,B,C = map(int,input().split())
tmpA = A
tmp = []
while A%B != C and A%B not in tmp:
    tmp.append(A%B)
    A += tmpA
if A%B == C:
    print("YES")
else:
    print("NO")

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

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

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

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

def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a 

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

Solution (Python):
a, b, c = map(int, input().rstrip("\n").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())
for i in range(1,B):
  if A*i %B==C:
    print("YES")
    exit(0)
print("NO")

Solution (Python):
def gcm(a,b):
    if a < b:
        a,b = b,a
    while True:
        if a % b == 0:
            return b
        else:
            a,b = b,a % b

A,B,C = map(int,input().split())
g = gcm(A,B)
if C % g == 0:
    print('YES')
else:
    print('NO')

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

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

ans = False
for i in range(1,10**5):
    if (a*i)%b == c:
        print("YES")
        ans = True
        break

if not(ans):
    print("NO")

Solution (Python):
a, b, c = map(int, input().split())
num = a
for i in range(b):
    if num % b == c:
        print('YES')
        break
    num += a
else:
    print('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())

can_divide = False
for i in range(1, B+1):
    n = A*i

    if n % B == C:
        can_divide = True

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

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

print('YES' if flag else '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())
print("YES" if any((a*i)%b==c for i in range(1,b+1)) else "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):
import fractions

A,B,C=map(int,input().split())
f=C%fractions.gcd(A,B)==0
print('YES' if f else '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())
for n in range(1,b+1):
  if (a*n)%b == c:
    print('YES')
    exit()
print('NO')

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

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

Solution (Python):
a,b,c=map(lambda x: int(x), input().split())
flag=[False]*b
tmp=0
for i in range(b):
    tmp=(tmp+a)%b
    if flag[tmp]==True:
        break
    else:
        flag[tmp]=True
if flag[c]==True:
    print('YES')
else:
    print('NO')

Solution (Python):

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

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

limit = A * B

i = 0
while True:
  val = B*i + C 
  if val == 0:
    continue

  if val > limit:
    print("NO")
    exit()

  if val % A == 0:
    print("YES")
    exit()

  i += 1

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

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

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

Solution (Python):
N,M,R = map(int,input().split())
ans = ''
for i in range(M+1):
    if  (i * N) % M == R:
        ans = 'YES'
        break;
if ans == '':
    ans = 'NO'
print(ans)

Solution (Python):
A,B,C=map(int,input().split())
D=[0]

i=1
while A*i%B not in D:
    D.append(A*i%B)
    i+=1

print('NYOE S'[C in D::2])

Solution (Python):
A,B,C = map(int,input().split())
flag = 0
for i in range(B):
    if (i*A)%B==C:
        flag = 1
        break
if flag==1:
    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
        break
print("YES" if ans == 1 else "NO")

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

    temp = 0
    ans = 'NO'
    
    
    
    
    for i in range(200):
        temp = c + i*b
        if temp % a == 0:
            ans = 'YES'

    print(ans)


if __name__ == '__main__':
    main()

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

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

print("NO")

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

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

Solution (Python):

ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b,c = nm()
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())
flg = 0

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

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

Solution (Python):
a,b,c=map(int,input().split())
ans=0
for i in range(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())
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())
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")

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())
for i in range(2*a*b):
  if a *(i+1) % b == c:
    print('YES')
    exit()
print('NO')

Solution (Python):
A,B,C = map(int,input().split())
mod0=A%B
def main():
  i=1
  while True:
    i+=1
    mod=(A*i)%B
    if mod==C:
      print("YES")
      break
    if mod==mod0:
      print("NO")
      break
if __name__=="__main__":
  main()

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

Solution (Python):
import sys

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

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

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

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

for i in range(B):
  if((i * A) % B == C):
    result = "YES"
    break

print(result)

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

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

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

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

Solution (Python):

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

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

Solution (Python):

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')

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

if a % b == 0:
    if c == 0:
        ans = "YES"
    else:
        ans = "NO"
else:
    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,open(0).read().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())
x=[]
for i in range(b):
    x.append(a*-~i%b)
print('YNEOS'[c not in x::2])

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=map(int,input().split())

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

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

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

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

Solution (Python):
def slove():
    import sys
    import collections
    input = sys.stdin.readline
    a, b, c = list(map(int, input().rstrip('\n').split()))
    d = collections.defaultdict(list)
    for i in range(a, 10 ** 10, a):
        if i % b not in d:
            d[i % b]
        else:
            break
    print("YES" if c in d else "NO")


if __name__ == '__main__':
    slove()

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())
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())

m = a%b

can_make = []

for i in range(a,a*b+1):
    if i%a == 0 and i%b not in can_make:
        can_make.append(i%b)

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

Solution (Python):
a,b,c=map(int,input().split())
M=[]
for i in range(1,b):
  M.append((a*i)%b)
N=sorted(set(M))

from fractions import gcd as bltin_gcd

if bltin_gcd(a, b) == 1:
  print('YES')
else:
  if a == b:
    if c == 0:
      print('YES')
    else:
      print('NO')
  else:
    x=N[1]
    if c%x == 0:
      print('YES')
    else:
      print('NO')

Solution (Python):
"""
    選ぶ整数の数: 1~
    選ぶ整数: A*nで表現できる
    sum % B = CであればYes

    sum = A*(n1+n2+...)
    sum % B = A%B * (n1+n2+...)%B = C
    A%BがCの約数であればYes
    (A%B*n)%BがCの約数であってもYes
"""
a, b, c = map(int, input().split())
flag = False
a_mod = a % b
if a_mod == 0 and c == 0:
    flag = True
elif a_mod == 0:
    pass

elif c % a_mod == 0:
    flag = True
else:
    
    
    for i in range(1, b-1):
        ia_mod = (i*a_mod) % b
        if ia_mod == 0:
            continue
        elif c % ia_mod == 0:
            flag = True
            break

if flag:
    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(1,b+1):
    if a*i % b == c:
        print("YES")
        break
else:
    print("NO")

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

ans=0

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

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

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

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

print('NO')

Solution (Python):
a,b,c=map(int, input().split())
list=[]
for i in range(b):
    list.append(a*(i+1)%b)
print('YES' if c in list else '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):
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):
import sys
a, b, c = map(int, input().split())
for n in range(a, a*b+1, a):
    if n % b == c:
        print('YES')
        sys.exit()
print('NO')

Solution (Python):
a, b, c = map(int, input().split())
ans = 'NO'
i = 0
while True:
    if i * a > a * b:
        break
    if i * a % b == c:
        ans = 'YES'
        break
    i += 1
print(ans)

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

def gcd(m, n):
    if m < n:
        return gcd(n, m)
    if n == 0:
        return m
    return gcd(n, m % n)

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

Solution (Python):
a,b,c = map(int,input().split())
num = 0
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())
l=max(a,b)
s=min(a,b)
while s!=0:
  l,s=s,l%s
print('NO' if c%l!=0 else 'YES')

Solution (Python):
a, b, c = map(int, input().split())
check = False
i = a
while i <= a * b:
    if i % b == c:
        check = True
    i = i + a
if check:
    print("YES")
else:
    print("NO")

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

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,input().split())
for i in range(B+1):
    if (A*i)%B == C:
        print("YES")
        sys.exit()
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):
import fractions
a,b,c = map(int,input().split())
if c%fractions.gcd(a,b) == 0:
    print('YES')
else:
    print('NO')

Solution (Python):
A,B,C=map(int,input().split());print(['NO','YES'][any([A*i%B==C for i in range(99)])])

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

Solution (Python):
a, b, c = map(int, 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())
ans = 'NO'
for i in range(B):
    if A * i % B == C:
        ans = 'YES'
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    a,b,c=map(int,input().split())
    from fractions import gcd
    d=gcd(a,b)
    print("NO" if c%d else "YES")
resolve()

Solution (Python):
import sys
input = sys.stdin.readline


class AtCoder:
    def main(self):
        A, B, C = map(int, input().split())

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


if __name__ == '__main__':
    AtCoder().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 k in range(b):
    if k * a % b == c:
        print('YES')
        break
else:
    print('NO')

Solution (Python):

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


if __name__ == "__main__":
    main()

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

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

while n <= 100:
    if n*a%b==c:
        print("YES")
        exit()
    n += 1
print("NO")

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

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

if a%2 == 0 and (b+c)%2 != 0:
    print('NO')
else:
    for i in range(1,101):
        if (b*i+c)%a == 0:
            print('YES')
            break
    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())
i = 1
x = a
while i <= a * b:
    if x % b == c:
        print('YES')
        exit()
    i += 1
    x = a * i

print('NO')

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

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

print("NO")

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

NG_flg = 1
for i in range(B):
    if (i*(A%B))%B == C%B: 
        NG_flg = 0

print("NO" if NG_flg == 1 else "YES")

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

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())

mod = A%B

tmp = 0
D = {}
while (not tmp in D) and tmp%B != C:
    D[tmp] = 1
    tmp += mod
    tmp %= B
if tmp%B == C:
    print("YES")
else:
    print("NO")

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

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

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

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

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

print('YES' if any((a*i)%b==c for i in range(b+1)) 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"
print(ans)

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
a,b,c=map(int,input().split())

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

Solution (Python):
from fractions import*;A,B,C=map(int,input().split());print("YNEOS"[C%gcd(A,B)>0::2])

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())
s=0
ans ='NO'

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

Solution (Python):
import sys
input = sys.stdin.readline

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):
a, b, c = map(int, input().split())
flag = True
i = 1
current = a * i
while i <= 100:
    if current % b == c:
        flag = False
        print('YES')
        break
    i += 1
    current = a * i
if flag:
    print('NO')

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

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

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

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

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

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

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

def gcd(x, y):
    while x != 0 and y != 0:
        x, y = max(x, y), min(x, y)
        x %= y
    return max(x, y)

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

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

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

f = False

for i in range(110):
  if (A*i)%B==C:
    f = True
if f:
  print("YES")
else:
  print("NO")

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

L = list()
i=1

while (A * i) %B not in L:
    L.append((A * i) %B)
    i += 1

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