import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [a,b,c] <- map (read::String->Int) . words <$> getLine
  putStrLn $ if elem c (remainders a b) then "YES" else "NO"

remainders a b = remainders' a b [] 1
remainders' a b list x
  |elem (mod (a*x) b) list = list
  |otherwise = remainders' a b (mod (a*x) b : list) (x+1)