N = gets.to_i

data = N.times.map { gets.split.map(&:to_i) }

except_zero = data.select { |_, _, h| h != 0 }
zero_only = data.select { |_, _, h| h == 0 }
cand = []

(0..100).each do |cy|
  (0..100).each do |cx|
    x, y, h = except_zero.first
    eh = h + (cy - y).abs + (cx - x).abs

    if except_zero[1..-1].all? { |x, y, h| eh == h + (cy - y).abs + (cx - x).abs }
      cand << [cx, cy, eh]
    end
  end
end

if cand.size == 1
  puts cand.first.join(' ')
else
  ans = cand.find do |cx, cy, eh| 
    zero_only.all? { |x, y, h| h == [eh - (cy - y).abs - (cx - x).abs, 0].max }
  end

  puts ans.join(' ')
end
