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

flag = False

for i in range(1,101):

    if (a*i)%b==c:

        flag = True

print(('YES' if flag==True else 'NO'))

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

flag = False

for i in range(1,b+1):

    if (a*i-c)%b==0:

        flag = True

print(('YES' if flag==True else 'NO'))

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

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

-for i in range(1, 101): -    if (a * i) % b == c: +for i in range(1, b + 1): +    if (a * i - c) % b == 0: