import Control.Monad

getList :: IO [Int]
getList = do
 [x, l] <- map read <$> (words <$> getLine) :: IO [Int]
 ak <- pure [x + l, x - l]
 return ak

main = do
 n <- read <$> getLine :: IO Int
 robotRange <- replicateM n getList 
 print robotRange