N = gets.to_i
A = []
B = []
N.times do
  tmp = gets.split.map(&:to_i)
  if tmp[2] > 0
    A << tmp
  else  
    B << tmp 
  end
end

for cy in 0..100
  for cx in 0..100
    tmp = A.map{|x, y, h| h + (x - cx).abs + (y - cy).abs}
    if tmp.uniq.size == 1
      ht = tmp[0]
      if B.all?{|x, y , h0| ht < (x - cx).abs + (y - cy).abs}
        puts "#{cx} #{cy} #{ht}"
        exit
      end
    end 
  end 
end
