a, b, c = map(int, input().split())
for i in range(10 ** 5):
    if (i * b + c) % a == 0:
        print('YES')
        exit()
print('NO')

cdb2ff0a92c842d8bb0b92ef52824acff6157c53
<mask token>

<mask token>
for i in range(10 ** 5):
    if (i * b + c) % a == 0:
        print('YES')
        exit()
print('NO')

a, b, c = map(int, input().split())
for i in range(10 ** 5):
    if (i * b + c) % a == 0:
        print('YES')
        exit()
print('NO')
