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



for i in range(1,10000):

    a = A*i

    if a % B == C:

        print('YES')

        exit()

print('NO')





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



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

    a = A*i

    if a % B == C:

        print('YES')

        exit()

print('NO')





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

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

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