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



ans = 'NO'

if a < b and c%a == 0:

  ans = 'YES'

else:

  for i in range(1, 100000):

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

      ans = 'YES'

      break

  

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



ans = 'NO'

if a < b and c%a == 0:

  ans = 'YES'

else:

  for i in range(1, 10000):

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

      ans = 'YES'

      break

  

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

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

-    for i in range(1, 100000): +    for i in range(1, 10000):