N = gets.to_i
XYHs = readlines.map{|l| l.split.map(&:to_i)}

xyhs, xy0s = XYHs.partition{|x, y, h| h > 0}
ans = []
[*0 .. 100].product([*0 .. 100]).each do |cx, cy|
  x, y, h = xyhs.first
  ch = h + (x - cx).abs + (y - cy).abs
  ans << [cx, cy, ch] if xyhs.drop(1).all?{|x, y, h| ch == h + (x - cx).abs + (y - cy).abs}
end
ans.select!{|cx, cy, ch| xy0s.all?{|x, y, z| ch - (x - cx).abs - (y - cy).abs <= 0}} if ans.size > 1
puts ans.join(" ")