import Control.Monad
import Control.Applicative
import Data.List
import Data.Array

main = do

    [a, b, c] <- (map read . words) <$> getLine
    if c `mod` (gcd a b) == 0 then putStrLn "YES"
                              else putStrLn "NO"

