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






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





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

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

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

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

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**6)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
import numpy as np

A, B, C = MAP()
for i in range(1, B):
	if (A*i - C)%B == 0:
		print("YES")
		break
else:
	print("NO")

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

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

Solution (Python):
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    A,B,C = list(map(int,_in[0].split(' ')))  
    
    for a in range(1,B+1):
        _ = (a*A)%B
        if _ == C:
            TF = 'YES'
            break
    else:
        TF = 'NO'
    
    print(TF)

Solution (Python):
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    A,B,C = list(map(int,_in[0].split(' ')))  
    
    mod_arr = []
    a = 1
    while True:
        _ = (a*A)%B
        if _ == C:
            TF = 'YES'
            break
        elif _ in mod_arr:
            TF = 'NO'
            break
        else:
            mod_arr.append(_)
            a+=1
    
    print(TF)

Solution (Python):
a,b,c = map(int, input().split())
n = 1
visited = set()
while True:
  if (n*a) % b in visited:
    print('NO')
    break
  if (n*a) % b == c:
    print('YES')
    break
  visited.add((n*a) % b)
  n += 1

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())
for i in range(1, 10*10):
    if A * i % B == C:
        print('YES')
        exit()

print('NO')

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

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

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

print('NO')

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

ans='NO'
i=1
while i<=B:
    if i*A%B==C:
        ans='YES'
    i+=1

print(ans)

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

print('NO')

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

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

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

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




n = 0
cnts = [0]*A
while True:
    mod = (n*B+C)%A
    if cnts[mod] == 1:
        print('NO')
        break
    if mod == 0:
        print('YES')
        break
    n += 1
    cnts[mod] = 1

Solution (Python):

import re
import math
from collections import defaultdict
import itertools
from copy import deepcopy
import random
from heapq import heappop,heappush
import time
import os
import queue
import sys
import datetime
from functools import lru_cache

readline=sys.stdin.readline
sys.setrecursionlimit(2000000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_power(a,b):
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def get_facs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def floor_(n,x=1):
    return x*(n//x)
def ceil_(n,x=1):
    return x*((n+x-1)//x)
def hani(x,min_,max_):
    ret=x
    if x<min_:ret=min_
    if x>max_:ret=max_
    return ret
def seifu(x):
    return x//abs(x)


def main():
    A,B,C=map(int,input().split())
    ama=set()
    for a in range(1,B+1):
        ama.add(A*a%B)
    YN(C in ama)
main()

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

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

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7


a,b,c = map(int,input().split())
d = []
for i in range(1,b+1):
    e = (a*i)%b
    if e == c:
        print("YES")
        sys.exit()
print("NO")

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

if __name__ == '__main__':
    main()

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

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

cnt = 0
su = a
while cnt < 100:
    if su%b == c:
        print("YES")
        exit()
    su+=a
    cnt+=1
    
print("NO")

Solution (Python):
def main(a: int, b: int, c: int):
    ls = []

    for i in range(a, b * a + 1, a):
        if i % b in ls:
            break

        ls.append(i % b)

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


if __name__ == "__main__":
    a, b, c = map(int, input().split())

    main(a, b, c)

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,sqrt
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


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

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

Solution (Python):
import sys

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

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

print('NO')

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

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

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

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

Solution (Python):
import itertools
import math

a,b,c = list(map(int,input().split(" ")))
ans = "NO"

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

Solution (Python):
from fractions import gcd

A, B, C = map(int, open(0).read().split())

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

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

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

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

Solution (Python):
a, b, c = map(int, 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=map(int, input().split())

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

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

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

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

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


def read():
    A, B, C = map(int, input().strip().split())
    return A, B, C

def solve(A, B, C):
    m = gcd(A, B)
    return "YES" if C % m == 0 else "NO"

if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs))

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())
ans="NO"
for i in range(A):
    if (B*i+C)%A==0:
        ans='YES'
print(ans)

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

Solution (Python):

import sys

MOD = 5  
YES = "YES"  
NO = "NO"  


def solve(A: int, B: int, C: int):
    from fractions import gcd
    return YES if C % gcd(A, B) == 0 else NO



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    C = int(next(tokens))  
    print(solve(A, B, C))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

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

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

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())
from fractions import gcd
print("NO")if c%gcd(a,b) 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
if cnt >= 1:
    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")
        exit()

print("NO")

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

while True:
  amari = a * k % b
  if amari == c:
    cnt += 1
  if amari == 0:
    break
  k += 1
  
if cnt == 0:
  print('NO')
else:
  print('YES')

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    A, B, C = map(int,readline().split())
    ans = 'NO'
    for i in range(1,B+1):
        if A*i%B==C:
            ans = 'YES'
    print(ans)



if __name__ == '__main__':
    main()

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
a, b, c = map(int, input().split())
li = []
for i in range(1,101):
    if i*a%b == c:
        print("YES")
        sys.exit()
    if i*a%b in li:
        print("NO")
        sys.exit()
    li.append(i*a%b)

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

s = (A - C) // B

for i in range(s, 101):
    if (B * i + C) % A == 0:
        print('YES')
        break
    if i == 100:
        print('NO')

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

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

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

count = 1
while B > count:
  if A * count % B == C:
    print("YES")
    exit(0)
  count += 1
print("NO")

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt, ceil
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True



def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P


def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret



a, b, c = map(int, input().split())
g = lcm(a, b)
yes = False
for i in range(a, g, a):
    if i % b == c:
        yes = True
        break
if yes:
    print("YES")
else:
    print("NO")

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

ans = 0
for i in range(1, 200):
    if i*a%b == c:
        ans = 1

if ans == 1:
    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
        break
print('YES' if flag else 'NO')

Solution (Python):
from fractions import gcd

def ngcd(nums):
	n = 0
	for i in nums:
		n = gcd(n, i)
	return n

def resolve():
	nums = list(map(int, input().split()))
	t = ngcd(nums)
	if t != 1:
		nums = [int(i/t) for i in nums]
	if gcd(nums[0], nums[1]) == 1:
		print("YES")
	else:
		print("NO")
resolve()

Solution (Python):
import sys
A, B, C = map(int, sys.stdin.readline().split())
for i in range(1, B + 1):
    if (A * i) % B == C:
        print("YES")
        exit()
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):
def resolve():
    A, B, C = list(map(int, input().split()))
    rems = []
    mul = 1
    while True:
        rem = (mul * A) % B
        if rem == C:
            print("YES")
            return
        if rem in rems:
            print("NO")
            return
        rems.append(rem) 
        mul += 1
    


if '__main__' == __name__:
    resolve()

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


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

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

if __name__ == '__main__':
    resolve()

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

s=set()
for i in range(b):
  s.add(a*i%b)
if c in s:
  print('YES')
else:
  print('NO')

Solution (Python):
A,B,C = map(int,input().split())
from fractions import gcd
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, 101):
    if (A * i) % B == C:
        print("YES")
        exit()
print("NO")

Solution (Python):
A, B, C = map(int,input().split())
D = [A * b for b in range(1, B+1)]

for a in D:
    if a % B == C:
        print("YES")
        exit()

print("NO")

Solution (Python):

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

amari = [0 for _ in range(b+1)]

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

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

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

print('NO')

Solution (Python):
def ABC162C(a,b):
    while b != 0:
        a %= b
        if a == 0:break
        b %= a
    return max(a,b)

a,b,c=map(int,input().split())
k=ABC162C(a,b)
print('YES' if k==ABC162C(ABC162C(b,c),k) else 'NO')

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

Solution (Python):
A,B,C=map(int,input().split())
R_lis = [-1]*(B)

for i in range (B):
    R_lis[i] = A*(i+1)%B

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

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

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

def gcd(a, b): return gcd(b, a % b) if b else abs(a)
def lcm(a, b): return abs(a // gcd(a, b) * b)

a, b, c = map(int, sys.stdin.readline().split())

def main():
    print("NO" if c % gcd(a, b) else "YES")

if __name__ ==  '__main__':
    main()

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

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

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

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

print("NO")

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

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

Solution (Python):
from fractions import gcd

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

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

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

reg = fractions.gcd(A,B)
tmp = A
flg = False
while tmp%B!=0:
    if tmp%B==C:
        flg = True
        break
    tmp += A
ans='YES' if flg else 'NO'
print(ans)

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):
import sys

from itertools import accumulate

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

    for i in range(1, b+1):
        yield a*i % b == c

print("YES" if any(main()) else "NO")

Solution (Python):
import sys

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

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())
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(b+10):
	if i == b+9:
		print('NO')
		break
	if a*(i+1)%b==c:
		print('YES')
		break

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

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

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

Solution (Python):
a,b,c = map(int,input().split())
cnt = 0
for i in range(b):
    cnt += a
    if cnt % 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())
Flag = False

for i in range(1,101):
    if A*i % B == C:
        Flag = True
        break
    if A*i > A*B:
        break
print('YES' if Flag else 'NO')

Solution (Python):




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

wkval = 0
ans = 'NO'


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


print(ans)

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

Solution (Python):
import fractions

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

G = fractions.gcd(A,B)

if C % G == 0:
    print("YES")
else:
    print("NO")

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



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

print("NO")

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

c0 = set()
a2 = a%b
c0.add(a2)
if a2 == c:
    ans = 'YES'
else:
    ans = 'NO'
while True:
    a2 += a%b
    a2 %= b
    if a2 == c:
        ans = 'YES'
        break
    if a2 in c0:
        break
    c0.add(a2)

print(ans)

Solution (Python):


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

    k = 0
    while k < b:
        if (k * a) % b == c:
            print('YES')
            return
        k += 1
    print('NO')


if __name__ == '__main__':
    main()