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

N = A % B

M, i = 0, 2

while M != N:

    M = i * N % B

    if M == C:

        print("YES")

        break

    i += 1

else:

    print("NO")
A, B, C = list(map(int, open(0).readline().split()))

import math

print(('YES' if C % math.gcd(B,A%B) == 0 else 'NO'))
A, B, C = list(map(int, input().split()))
N = A % B
M, i = 0, 2
while M != N:
    M = i * N % B
    if M == C:
        print("YES")
        break
    i += 1
else:
    print("NO")

A, B, C = list(map(int, open(0).readline().split()))
import math

print(("YES" if C % math.gcd(B, A % B) == 0 else "NO"))

-A, B, C = list(map(int, input().split())) -N = A % B -M, i = 0, 2 -while M != N: -    M = i * N % B -    if M == C: -        print("YES") -        break -    i += 1 -else: -    print("NO") +A, B, C = list(map(int, open(0).readline().split())) +import math + +print(("YES" if C % math.gcd(B, A % B) == 0 else "NO"))