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')
from collections import Counter,defaultdict,deque

from heapq import heappop,heappush,heapify

from bisect import bisect_left,bisect_right 

import sys,math,itertools,fractions,pprint

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))



a,b,c = inpl()

now = 0

for i in range(10**5):

    now += a

    if now%b == c:

        print('YES')

        break

else:

    print('NO')
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")

from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
from bisect import bisect_left, bisect_right
import sys, math, itertools, fractions, pprint

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


a, b, c = inpl()
now = 0
for i in range(10**5):
    now += a
    if now % b == c:
        print("YES")
        break
else:
    print("NO")

-import sys, bisect, math, itertools +from bisect import bisect_left, bisect_right +import sys, math, itertools, fractions, pprint +INF = float("inf") -def inpln(n): -    return list(int(sys.stdin.readline()) for i in range(n)) - - -for i in range(100000): -    if (c + b * i) % a == 0: +now = 0 +for i in range(10**5): +    now += a +    if now % b == c: