from numpy import*;a,b,c=int_(input().split());print(('YNEOS'[all(a*list(range(b))%b-c)::2]))
import math

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

print(('YNEOS'[c%math.gcd(a,b)>0::2]))
from numpy import *

a, b, c = int_(input().split())
print(("YNEOS"[all(a * list(range(b)) % b - c) :: 2]))

import math

a, b, c = list(map(int, input().split()))
print(("YNEOS"[c % math.gcd(a, b) > 0 :: 2]))

-from numpy import * +import math -a, b, c = int_(input().split()) -print(("YNEOS"[all(a * list(range(b)) % b - c) :: 2])) +a, b, c = list(map(int, input().split())) +print(("YNEOS"[c % math.gcd(a, b) > 0 :: 2]))