N = gets.to_i
xyh_list = N.times.map { gets.chomp.split(' ').map(&:to_i) }

def calc_ph((cx, cy), (x, y, h))
  h + (x - cx).abs + (y - cy).abs
end

(0..100).each do |cx|
  (0..100).each do |cy|
    cp = [cx, cy]
    ok = xyh_list.map do |xyh|
      calc_ph(cp, xyh)
    end.uniq.size == 1
    if ok
      xyh = xyh_list.first
      ph = calc_ph(cp, xyh)
      puts "#{cx} #{cy} #{ph}"
      exit 0
    end
  end
end
