N = gets.to_i

min_x = 101
max_x = 0
min_y = 101
max_y = 0

points = []
N.times do
  x, y, h = gets.split.map(&:to_i)
  points << [x, y, h]

  min_x = [x, min_x].min
  max_x = [x, max_x].max
  min_y = [y, min_y].min
  max_y = [y, max_y].max
end

min_x.upto(max_x) do |x|
  min_y.upto(max_y) do |y|
    sum = []
    points.each do |p|
      sum << [p[2] + (p[0] - x).abs + (p[1] - y).abs, 0].max
    end

    # puts "#{points} x: #{x} y: #{y} => #{sum}"

    if sum.uniq.size == 1
      height = points.first[2] + (points.first[1] - x).abs + (points.first[0] - y).abs
      puts "#{x} #{y} #{sum.first}"
      exit 0
    end
  end
end
