main :: IO () main = interact $ show . solve . map read . words solve :: [Integer] -> Integer solve [a, b] = if d `div` b < 2 then 1 else 2 where c = 5000 `div` a d = c * b