import Control.Monad
import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import Data.List as List


solve :: Int -> Int -> Int -> Int -> Bool
solve a b c n
    | m == c = True
    | n > b = False
    | otherwise = solve a b c (n + 1)
    where
        m = (a * n) `mod` b

toYesNo :: Bool -> String
toYesNo True = "YES"
toYesNo _ = "NO"


main :: IO()
main = do
    (a:b:c:_) <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    putStrLn $ toYesNo (solve a b c 1)   