n = STDIN.gets.chomp.to_i
posts = []
n.times do
  pts = STDIN.gets.chomp.split(/ +/).map(&:to_i)
  posts << pts
end
xy = []
(0..100).each do |x|
  (0..100).each do |y|
    xy << [x,y]
  end
end

result = []

xy.each do |pt|
  height = nil
  posts.each do |post|
    h = (pt[0] - post[0]).abs + (pt[1] - post[1]).abs + post[2]
    
    if height != nil && h != height
      height = nil
      break
    else
      height = h
    end
  end
  
  if height != nil
    result = pt + [ height ]
    break
  end
end

puts result.join(" ")
