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

import fractions

g = fractions.gcd(a, b)

if c%g == 0:

    print('YES')

else:

    print('NO')

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

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

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

        print('YES')

        exit()

else:

    print('NO')

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

g = fractions.gcd(a, b)
if c % g == 0:
    print("YES")
else:
    print("NO")

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

-import fractions - -g = fractions.gcd(a, b) -if c % g == 0: -    print("YES") +for i in range(1, b + 1): +    if (a * i) % b == c: +        print("YES") +        exit()