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())
ab=list(range(A,A*B+1,A))
ans="NO"
for c in ab:
  if c%B==C:
    ans="YES"
    break
print(ans)

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

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

for i in range(10000):
  if i%A==0 and i%B==C:
    z = "YES"

print(z)

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

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

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

Solution (Python):
a,b,c=map(int,input().split())
d=a
jol=[]

while True:
    
    if d%b==c:
        print("YES")
        exit()

    elif d%b not in jol:
        jol.append(a%b)
        
    else:
        print("NO")
        exit()
    
    d+=a

Solution (Python):
a,b,c=map(int,input().split())
L=[]
ans="NO"
for i in range(100):
    m=0
    m=a*(i+1)%b
    L.append(m)
    if m==c:
        ans="YES"
        break
    elif L.count(m)>1:
        break
print(ans)

Solution (Python):
A,B,C = map(int, input().split())
ans_list = []
count = 1
while True:
  div_num = A*count
  ans = div_num % B
  if ans in ans_list:
    break
  else:
    ans_list.append(ans)
  count += 1
if C in ans_list:
  print("YES")
else:
  print("NO")

Solution (Python):
a, b, c = map(int, input().split())
d = a
e = []
while True:
    if d % b == c:
        print("YES")
        exit()
    else:
        if d % b not in e:
            e.append(d % b)
        else:
            print("NO")
            exit()
        d += a

Solution (Python):


import sys

sys.setrecursionlimit(10**7)


input = sys.stdin.readline


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h(typ) if m > 1 else typ(input()) for _ in range(n)]


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

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


if __name__ == '__main__':
    main()

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

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

print("NO")

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

  print(result)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


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


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


def C():
    return


def D():
    return


if __name__ == '__main__':
    B()

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

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

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

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

    print('NO')


if __name__ == "__main__":

    main()

Solution (Python):
a,b,c=map(int,input().split())
print('YNEOS'[c not in [a*i%b for i in range(b)]::2])

Solution (Python):
a, b, c = map(int, input().split())
d = {}
e = 1
while True:
    if e * a % b not in d:
        d[e * a % b] = 0
        e += 1
    else:
        if c in d:
            print("YES")
        else:
            print("NO")
        exit()

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

res = False
a = A
while a < B * A:
    if a % B == C:
        res = True
        break
    a += A

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

Solution (Python):


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

    dataset = set()
    for i in range(2, 100000):
        now_amari = (a * i) % b
        dataset.add(now_amari)

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



if __name__ == '__main__':
    main()

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

R = set()
m = 1
while (a * m) % b not in R:
    R.add((a * m) % b)
    m += 1
    a %= b

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

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

kouyaku=fractions.gcd(a,b)

c_l=[]
for i in range(int(b/kouyaku)):
    c_l.append(i*kouyaku)
if c in c_l:
    print("YES")
else:
    print("NO")

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


if b==0:
    print("NO")
elif a==0 and c!=0:
    prnt("NO")
elif a==1 or c==0:
    print("YES")
elif a==c:
    print("YES")
elif a==b and c!=0:
    print("NO")
elif a==b and c==0:
    print("YES")
    
else:
    
    kouyaku=fractions.gcd(a,b)
    
    c_l=[]
    for i in range(int(b/kouyaku)):
        c_l.append(i*kouyaku)
    if c in c_l:
        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):
row = list(map(int, input().split()))
Flag = False
for i in range(1000000):
    if row[0]*i % row[1] == row[2]:
        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 % 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(0)
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())

R = []
sum = A
while True:
    r = sum % B
    if r == C:
        print('YES')
        break
    if r in R:
        print('NO')
        break

    R.append(sum % B)
    sum += A

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

r1 = a % b
r0 = c % b

r = r1
while True:
    if r == r0:
        print("YES")
        break
    r = (r + r1) % b
    if r == r1:
        print("NO")
        break

Solution (Python):



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

s = a
for i in range(a*b):
    x = s % b
    if x == c:
        print('YES')
        quit()
    s += a
print('NO')

Solution (Python):

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

lis = []
ans = ""
now = A % B

while True:

    if now == C:
        ans = "YES"
        break

    if now in lis:
        ans = "NO"
        break

    lis.append(now)
    now += A
    now = now % B

print (ans)

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

if mod == c:
    print("YES")
else:
    i = 2
    flag = 0
    while (mod*i)%b != mod:
        if (mod*i)%b == c:
            flag = 1
            break
        i += 1
    if flag == 1:
        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):
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())
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())

check = []
i = 1
while True:
    a = A * i % B
    if a == C:
        print("YES")
        exit()
    if a in check:
        break
    else:
        check.append(a)
    i += 1

print("NO")

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

sum = 0

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

print("NO")

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

for i in range(10000):
  if i%a[0]==0 and i%a[1]==a[2]:
    b = "YES"
else:
  print(b)

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

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

Solution (Python):
A, B, C = [int(s) for s in input().split()]
print('YNEOS'[C not in [A * (i + 1) % B for i in range(B)]::2])

Solution (Python):
a,b,c = map(int,input().split())
cond = True
while cond:
    mod = a%b
    if mod != 0:
        a = b
        b = mod
    else:
        cond = False
if c%b == 0:
    print('YES')
else:
    print("NO")

Solution (Python):
from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]

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

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

Solution (Python):
a, b, x  = map(int, input().split())
sum = 0
status = "NO"
for i in range(101):
  if (a * i) % b == x:
    status = "YES"
print(status)

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

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

    print("NO")

resolve()

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

num = []
for i in range(1, B+1):
    num.append((i * A) % B)

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

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


mods = list()
i = 1
while(True):
    
    mod = (A * i) % B
    if (mod == C):
        print("YES")
        break
    elif(mod in mods):
        print("NO")
        break
    else:
        mods.append(mod)
    i += 1

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

Solution (Python):

a, b, c = map(int, input().split())
remainder_list = []
for i in range(b):
    tmp_remainder = (a*i) % b
    remainder_list.append(tmp_remainder)
if c in remainder_list:
    print('YES')
else:
    print('NO')

Solution (Python):

import sys
sys.setrecursionlimit(300000)

YES = "YES"  
NO = "NO"  

def solve(A: int, B: int, C: int):
    ret = NO
    for i in range(1, 1001):
        if (A * i) % B == C:
            ret = YES
    print(ret)
    return


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))  
    solve(A, B, C)

if __name__ == '__main__':
    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())
ans='NO'
for i in range(1,b):
    if a*i%b==c:ans='YES'
print(ans)

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

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

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

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

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

resolve()

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B, C = nl()

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

print('NO')

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

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

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

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

Solution (Python):
import fractions as f
a,b,c=map(int,input().split())
print('YES' if c%(f.gcd(a,b))==0 else 'NO')

Solution (Python):
def gcd(a, b):
    while b:
        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())
flag = False

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

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

Solution (Python):
A,B,C=map(int,input().split())
i=A%B
S=set()
while(True):
    if i==C:
        print("YES")
        quit()
    if i in S:
        print("NO")
        quit()
    S.add(i)
    i+=A
    i%=B

Solution (Python):
A, B, C = map(int, input().split())
S = set()
for i in range(1, 10001):
    S.add(A * i % B)

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

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




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

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

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

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

Solution (Python):



num, div, rem = map(int, input().split())
flag = 0

for i in range(div):
    if num * i % div == rem:
        flag = 1
        print("YES")
        break

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

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

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

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys
import string

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


A, B, C = list(map(int, sys.stdin.readline().split()))
a = A
ok = False
for _ in range(1000):
    ok |= a % B == C
    a += A
if ok:
    print('YES')
else:
    print('NO')

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

mod = a % b
i = 0
num = []
while mod != 0:
    i += 1
    mod =  (a * i) % b
    num.append(mod)

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

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

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

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

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

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

i = 1
while True:
    mod = a * i % b
    if mod == c:
        print("YES")
        break
    if i == 1:
        s_mod = mod
    elif s_mod == mod:
        print("NO")
        break
    i += 1

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):
def gcd(a,b):
  while b:
    a,b = b,a%b
  return a

a,b,c = map(int,input().split())
g = gcd(a,b)
answer = 'YES' if c%g == 0 else 'NO'
print(answer)

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

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

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


first = a % b
if first == c:
  print("YES")
  exit()

count = 2
while True:
  amari = (count*a) % b
  if amari == first:
    print("NO")
    exit()
  if amari == c:
    print("YES")
    exit()
  else:
    count+=1

Solution (Python):
A, B, C = [int(s) for s in 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())

s=a

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

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

for i in range(B + 1):
    if s % B == C:
        print('YES')
        exit()
    else:
        s += A
        

print('NO')

Solution (Python):
import math
def main(a, b, c):
    for i in range(b):
        if (a * i) % b == c:
            print('YES')
            return

    print('NO')

if __name__ == "__main__":
    a, b, c = [int(x) for x in input().split()]
    main(a, b, c)

def test1(capsys):
    inputs = [7, 5, 1]
    out = 'YES'
    main(*inputs)
    captured = capsys.readouterr()    
    assert captured.out == str(out) + '\n'

def test3(capsys):
    inputs = [2, 2, 1]
    out = 'NO'
    main(*inputs)
    captured = capsys.readouterr()    
    assert captured.out == str(out) + '\n'

def test4(capsys):
    inputs = [1, 100, 97]
    out = 'YES'
    main(*inputs)
    captured = capsys.readouterr()    
    assert captured.out == str(out) + '\n'

def test5(capsys):
    inputs = [40, 98, 58]
    out = 'YES'
    main(*inputs)
    captured = capsys.readouterr()    
    assert captured.out == str(out) + '\n'

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

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

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

print('NO')

Solution (Python):
A, B, C = map(int, input().split())
modlist = []
now = A
flag = True
while flag:
	if now%B == C:
		break
	if now%B in modlist:
		flag = False
	else:
		modlist.append(now%B)
	now += A
if flag: print('YES')
else: print('NO')

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

Solution (Python):
def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, B, C] = list(map(lambda x: int(x), inputs[0].split()))
    first_state = A % B
    state = None
    if first_state == C:
        return "YES"

    sum = A
    while state != first_state:
        sum += A
        sur = sum % B
        if sur == C:
            return "YES"
        state = sur

    return "NO"


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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


import itertools
import collections
import bisect

def main():
    A, B, C = map(int, input().split())
    for c in range(1, B+1):
        if (A * c) % B == C:
            print('YES')
            exit()

    print('NO')


if __name__ == '__main__':
    main()

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

if c % fractions.gcd(a,b) == 0: print('YES')
else: 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'
        break
print(ans)

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

rem = set()
a = A
while True:
    r = a % B
    if r in rem:
        break
    rem.add(r)
    a += A

if C in rem:
    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):
a,b,c = [int(i) for i in input().split()]

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

print(answer)

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

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

for i in range(a*b):
  if (a*i)%b == 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())

print(["NO","YES"][B>C and C%gcd(A,B)==0])

Solution (Python):


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

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

Solution (Python):
A, B, C = list(map(int, input().strip().split(' ')))
tmp = A % B
rest = set()
rest.add(tmp)
for _ in range(B):
    tmp = (tmp + A) % B
    rest.add(tmp)
if C in rest:
    print('YES')
else:
    print('NO')

Solution (Python):


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

for i in range(A*B):
    if(A*i % B == C):
        count = 1
    else:
        print('',end='')

if(count == 1):
    print('YES')
else:
    print('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())

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

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

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

Solution (Python):
from sys import exit, stdin
A, B, C = [int(_) for _ in stdin.readline().rstrip().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())
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(a, a*b+1, a):
    if i % b == c:
        print('YES')
        exit()

print('NO')

Solution (Python):
a, b, c = map(int, input().split())
ans = "NO"
for i in range(1,a+1):
    if (b*i+c)%a == 0:
        ans = "YES"
        break
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())
sum = 0
remainder_list = []

while True:
    sum += A
    remainder = sum % B
    if remainder not in remainder_list:
        remainder_list.append(remainder)
    else:
        break

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

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

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

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

l = []
cnt = 1

while 0 not in l:
    ans = (a*cnt)%b
    l.append(ans)
    cnt += 1
    
if c in l:
    print("YES")
else:
    print("NO")

Solution (Python):


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

    
    
    
    
    

    for x in range(1, B+1):
        if (A*x-C)%B == 0:
            print("YES")
            return
    print("NO")

if __name__ == "__main__":
    solve()

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

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

def gcd(a,b):
    a = a%b
    if a==0:
        return b
    else:
        a,b = b,a
        return gcd(a,b)
            
            
g = gcd(a,b)
if c%g == 0:
    print("YES")
else:
    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 itertools
A, B, C = map(int, input().split())

qs = []
s = 0
for n in itertools.count(1):
    s += A
    q = (s - C) % B
    if q == 0:
        print('YES')
        break
    elif q in qs:
        print('NO')
        break
    else:
        qs.append(q)

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())
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 = (int(x) for x in input().split())

if A % B == C:
    print("YES")
else:
    x = A % B
    i = 2
    word = "NO"
    while A*i % B != x:
        if  A*i % B == C:
            word = "YES"
            break
        i += 1
    print(word)

Solution (Python):
import sys
A, B, C = map(int, input().split())
for k in range(10000000):
  if (k * A) % B == C:
    print("YES")
    sys.exit(0)
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())
flag = False
for i in range(B):
  if A*i % B == C:
    flag = True
  else:
    pass
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,100):
    if (A*i)%B==C:
        print('YES')
        break
else:
    print('NO')

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

Solution (Python):
a,b,c=map(int,input().split())
n=a*b
flag=True
for i in range(1,n+1):
    if (a*i)%b==c:
        flag=False
        break
print("YNEOS"[flag::2])

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math

mod = 10**9+7

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

import time

now = time.time()

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

    if i == B-1:
        print("NO")

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math

mod = 10**9+7

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

import time

now = time.time()

mod = A
while True:
    mod += A
    if mod % B == C:
        print("YES")
        break
    if time.time()-now > 1:
        print("NO")
        break

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

Solution (Python):

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


l=[0]*100


t=1

while True:
  
  x=t*A%B

  
  if x==C:
    print('YES')
    exit()

  
  elif l[x]>0:
    print('NO')
    exit()

  
  else:
    l[x]+=1

  
  t+=1

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    A, B, C = [int(ele) for ele in input().split()]
    ans = "NO"
    for i in range(10000):
        if (A * i) % B == C:
            ans = "YES"

    print(ans)


if __name__ == "__main__":
    main()

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

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