#coding: utf-8



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

#coding: utf-8



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

count = 0



for i in range(A*B):

    if(A*i % B == C):

        print('YES')

        break

else:

    print('NO')
# coding: utf-8
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")

# coding: utf-8
A, B, C = list(map(int, input().split()))
count = 0
for i in range(A * B):
    if A * i % B == C:
        print("YES")
        break
else:
    print("NO")

-A, B, C = map(int, input().split()) +A, B, C = list(map(int, input().split())) -        count = 1 -    else: -        print("", end="") -if count == 1: -    print("YES") +        print("YES") +        break