main = getLine >>= putStrLn . maybe "NO" show . formula . map read . words formula [a,b] = let (d,m) = divMod b a in if m==0 then Just d else Nothing