N = gets.to_i

data = []
N.times do
  data << gets.split.map(&:to_i)
end

found = false
0.upto(100) do |x|
  0.upto(100) do |y|
    sh = nil
    data.each_with_index do |d, i|
      h = (d[0] - x).abs + (d[1] - y).abs + d[2]
      sh = h if sh.nil?
      if h == sh
        if i == data.size - 1
          puts "#{x} #{y} #{h}"
          found = true
          break
        end
      else
        break
      end
    end

    break if found
  end

  break if found
end

