solver::Int -> Int -> Int -> String
solver a b c = if b <= c then "YES" else if or (map (\ x ->(mod (x*a) b) == c) [1..b]) then "YES" else "NO"

main::IO()
main=do
  dat<-getLine
  let a:b:c:[] = map read (words dat)::[Int]
  putStr (solver a b c)
  putStr "\n"
