N = gets.to_i
S = []
N.times{
  S << gets.chomp.split(" ").map(&:to_i)
}

ans = []
(0..100).each{|i|
  (0..100).each{|j|
    wk = (i - S[0][0]).abs + (j - S[0][1]).abs + S[0][2]
    ans = [i, j, wk]
    (1...N).each{|k|
      (ans.clear; break) if wk - (i - S[k][0]).abs - (j - S[k][1]).abs != S[k][2]
    }
    break if not ans.empty?
  }
  break if not ans.empty?
}

puts ans.join(" ")
