n = STDIN.gets.chomp.to_i
posts = []
n.times do
  posts << STDIN.gets.chomp.split(/ +/).map(&:to_i)
end
xy = []
(0..100).each do |x|
  (0..100).each do |y|
    xy << [x,y,nil]
  end
end

posts.combination(2) do |a, b|
  dh = (a[2] - b[2]).abs
  xy.delete_if do |pt|
      dha = (a[0]-pt[0]).abs + ( a[1]-pt[1]).abs
      dhb = (b[0]-pt[0]).abs + ( b[1]-pt[1]).abs
       if (dha-dhb).abs != dh
         true
       elsif pt[2] != nil && pt[2] != a[2] + dha
         true
       else
         pt[2] = a[2] + dha
         false
       end
   end
   break if xy.size == 1
end
puts xy[0].join(" ")

