import Control.Applicative ((<$>))

solve xs c =
  let ys = filter (\x -> x == c) xs in
    if ys /= []
      then "YES"
      else "NO"

main = do
  [a, b, c] <- fmap read <$> words <$> getLine :: IO [Int]
  let xs = fmap (\x -> x * a `mod` b) [1..b] in
    putStrLn (solve xs c)
