from math import gcd 
a,b,c=map(int,input().split())
if gcd(a,b)==1:
    print("YES")
else:
    g=gcd(a,b)
    print("YES" if c%g==0 else "NO")
    


65fe367de94c2432b2348e7e9b914e9eba0a1206
<mask token>

<mask token>
if gcd(a, b) == 1:
    print('YES')
else:
    g = gcd(a, b)
    print('YES' if c % g == 0 else 'NO')

<mask token>
a, b, c = map(int, input().split())
if gcd(a, b) == 1:
    print('YES')
else:
    g = gcd(a, b)
    print('YES' if c % g == 0 else 'NO')

from math import gcd
a, b, c = map(int, input().split())
if gcd(a, b) == 1:
    print('YES')
else:
    g = gcd(a, b)
    print('YES' if c % g == 0 else 'NO')

from math import gcd 
a,b,c=map(int,input().split())
if gcd(a,b)==1:
    print("YES")
else:
    g=gcd(a,b)
    print("YES" if c%g==0 else "NO")
    

