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

-- |
--
-- >>> solve (7, 5, 1)
-- True
--
-- >>> solve (2, 2, 1)
-- False
solve :: (Int, Int, Int) -> Bool
solve (a, b, c) = any f [1 .. b]
  where f n = (n * a) `mod` b == c
