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|
  ch = nil
  is_ans = multiple_array.all? do |array|
    h = (cx - array[0]).abs + (cy - array[1]).abs + array[2]
    ch ||= h
    ch == h if ch > h && array[2] == 0
    (ch == h && array[2] != 0) || (ch <= h && array[2] == 0)
  end
  ans = [cx, cy, ch].join(" ") if is_ans
end

puts ans
