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

xyhs, xy0s = XYHs.partition{|x, y, h| h > 0}
x0, y0, h0 = xyhs.pop
ans = [*0 .. 100].product([*0 .. 100]).each_with_object([]) do |(cx, cy), a|
  ch = h0 + (x0 - cx).abs + (y0 - cy).abs
  a << [cx, cy, ch] if xyhs.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(" ")