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

getsolve :: Int -> Int -> Int -> Int -> Bool
getsolve a b c count
    | mod (a * count ) b == c			= True
    | mod (a * count ) b == 0			= False
    | otherwise							= getsolve a b c (count + 1)
    where modul = mod (a * count) b