n = gets.chomp.to_i

ax = []
ay = []
ah = []
n.times do
  x, y, h = gets.chomp.split(" ").map(&:to_i)
  ax << x
  ay << y
  ah << h
end

0.upto(100) do |cx|
  0.upto(100) do |cy|
    hh = []
    n.times do |i|
      x = ax[i]
      y = ay[i]
      h = ah[i]
      if h > 0
        ch = h + (x - cx).abs + (y - cy).abs
        if ch > 0
          hh << ch
        end
      end
    end
    if hh.uniq.length == 1
      puts "#{cx} #{cy} #{hh[0]}"
      exit
    end
  end
end