n = gets.to_i
s = (1..n).map{gets.split.map(&:to_i)}
ans = []
101.times{|x|101.times{|y|
    sd = s.sort{|a, b|
        aa = (a[0] - x).abs + (a[1] - y).abs
        bb = (b[0] - x).abs + (b[1] - y).abs
        aa <=> bb
    }
    h = (sd[0][0] - x).abs + (sd[0][1] - y).abs + sd[0][2]
    ans = [x, y, h] if s.select{|v|
        v[2] != 0 || (v[0] - x).abs + (v[1] - y).abs <= h
    }.select{|v|
        (v[0] - x).abs + (v[1] - y).abs + v[2] != h}.length == 0
    }}
puts ans.join(" ")
