N = gets.to_i
xyh = $<.map{|s| s.split.map &:to_i }
xyh1, *xyh2 = xyh

def f(xyh, cx, cy)
  x, y, h = xyh
  ch = (cx - x).abs + (cy - y).abs + h
end

cy, cx = [*0..100].product([*0..100]).find{|cy, cx|
  xyh.map{|a|
    f(a, cx, cy)
  }.uniq.size == 1
}

ch = f(xyh1, cx, cy)
puts [cx, cy, ch]*" "
