main :: IO ()
main = do
  a:b:c:_ <- fmap (\x -> read x :: Int) <$> words <$> getLine
  putStrLn $ solve a b c
    where
      solve a b c
        | 0 == c `mod` (gcd a b) = "YES"
        | True = "NO"