main = getLine >>= putStrLn . (\[x,y] -> if (y `mod` x) == 0 then show (y `div` x) else "NO") . map read . words