N = gets.to_i

data = []
N.times do
  data << gets.split.map(&:to_i)
end
positive_h_data = data.select do |d|
  d[2] > 0
end
zero_h_data = data.select do |d|
  d[2] == 0
end

found = false
0.upto(100) do |x|
  0.upto(100) do |y|
    h = []
    positive_h_data.each do |d|
      h << (d[0] - x).abs + (d[1] - y).abs + d[2]
    end
    if h.uniq.size == 1
      found = true
      zero_h_data.each do |d|
        if h.first > (d[0] - x).abs + (d[1] - y).abs
          found = false
          break
        end
      end
    end
    if found
      puts "#{x} #{y} #{h.first}"
    end

    break if found
  end

  break if found
end