
type T a = (a,a,a)
f :: [a] -> T a
f [x,y,z] = (x,y,z)

a # b = abs (a-b)

first cx cy ((x,y,h):xs)
  | h == 0 = first cx cy xs
  | otherwise = h + x#cx + y#cy

p :: Int -> Int -> T Int -> (Int -> Bool)
p cx cy (x,y,h)
  | h==0 = (<=(x#cx + y#cy))
  | otherwise = (==(h+ x#cx + y#cy))

check :: [(Int,Int,Int)] -> Int -> Int -> Int -> Bool
check xs cx cy h = all ($h) (map (p cx cy) xs)

solv xs = go xs [(cx,cy)|cx<-[0..100], cy<-[0..100]] where
  go xs ((cx,cy):cs)
    | check xs cx cy h = [cx,cy,h]
    | otherwise = go xs cs
    where h = first cx cy xs

main = do
  [n] <- map read . words <$> getLine :: IO [Int]
  xs <- map (f.map read.words) . lines <$> getContents
  putStrLn . unwords . map show $ solv xs
