import Control.Monad

main :: IO ()
main = do
  n <- readLn
  if n == 0
    then return ()
    else do
      ls <- replicateM n getLine
      let ls' = map (map read . words) ls
      putStrLn (solve ls')
      main

solve :: [[Int]] -> String
solve ls = toStr (foldl1 comp (map toTuple ls))
  where
    toStr :: (Int,Int) -> String
    toStr (a,b) = (show a) ++ " " ++ (show b)

    comp :: (Int,Int) -> (Int,Int) -> (Int,Int)
    comp (a1,b1) (a2,b2)
      | b1 < b2 = (a2,b2)
      | otherwise = (a1,b1)
      
    toTuple :: [Int] -> (Int,Int)
    toTuple [p,d1,d2] = (p,d1+d2)