import System.IO import Control.Monad main = main' (0,0) where main' (x,y) = do putStrLn (unwords (map show [x,y])) hFlush stdout m <- readLn unless (m==0) $ do putStrLn (unwords (map show [m,0])) hFlush stdout mx <- readLn putStrLn (unwords (map show [m - div mx 2, div mx 2])) hFlush stdout