import fractions



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

gcd = fractions.gcd(A, B)



if gcd == 1 and C != 0 or gcd != 1 and fractions.gcd(gcd, C) != 1:

    print('YES')

else:

    print('NO')
import sys



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



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

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

        print('YES')

        sys.exit()



print('NO')
import fractions

A, B, C = list(map(int, input().split()))
gcd = fractions.gcd(A, B)
if gcd == 1 and C != 0 or gcd != 1 and fractions.gcd(gcd, C) != 1:
    print("YES")
else:
    print("NO")

import sys

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

-import fractions +import sys -gcd = fractions.gcd(A, B) -if gcd == 1 and C != 0 or gcd != 1 and fractions.gcd(gcd, C) != 1: -    print("YES") -else: -    print("NO") +for i in range(1, B + 1): +    if (A * i) % B == C: +        print("YES") +        sys.exit() +print("NO")