-- Try yukicoder -- author: Leonardone @ NEETSDKASU import System.IO main = do let maxlen = 100000 putStrLn "0 0" hFlush stdout len0 <- read <$> getLine if len0 == 0 then return () else do putStrLn $ "0 " ++ show maxlen hFlush stdout len1 <- read <$> getLine if len1 == 0 then return () else do let x = (len0 + len1 - maxlen) `div` 2 let y = len0 - x putStrLn $ show x ++ " " ++ show y hFlush stdout getLine return ()