N = gets.chomp.to_i
multiple_array = N.times.map { gets.split.map(&:to_i) }
ans = Array.new
(0..100).to_a.repeated_permutation(2) do |cx, cy|
  h1 = 0
  is_ans = true
  multiple_array.each do |array|
    h2 = (cx - array[0]).abs + (cy - array[1]).abs + array[2]
    h1 = h2 if h1 == 0
    is_ans = false if h1 != h2
  end
  ans = [cx, cy, h1].join(" ") if is_ans
end

puts ans