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