main :: IO () main = interact $ show . solve . map read . words solve :: [Int] -> Int solve [n, m] | even n = if m < n `div` 2 then -1 else 2 | otherwise = if m >= n then 1 else - 1