import fractions

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

print(("YES" if c % fractions.gcd(a, b) == 0 else "NO"))

import fractions

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

gcd = fractions.gcd(a, b)

print(("YES" if c % gcd == 0 else "NO"))

import fractions

a, b, c = list(map(int, input().split()))
print(("YES" if c % fractions.gcd(a, b) == 0 else "NO"))

import fractions

a, b, c = list(map(int, input().split()))
gcd = fractions.gcd(a, b)
print(("YES" if c % gcd == 0 else "NO"))

-print(("YES" if c % fractions.gcd(a, b) == 0 else "NO")) +gcd = fractions.gcd(a, b) +print(("YES" if c % gcd == 0 else "NO"))