func a b = let r = b / a in case r of _ | r - fromIntegral (truncate r) == 0 -> Just (truncate r) | otherwise -> Nothing main = do [a,b] <- map read . words <$> getLine case func a b of Just n -> print n Nothing -> putStrLn "NO"