main = do [n, m] <- map read . words <$> getLine print $ solve n m solve :: Int -> Int -> Int solve n m = if n <= m then 1 else if n `mod` m == 0 then n `div` m else -1