(defn MiniPyramid [X Y H [x y h]]
  (let[hest (max 0 
              (- H 
                (Math/abs (- X x)) 
                (Math/abs (- Y y))))]
    (= h hest)))
              

(defn Pyramid [ls]
  (first(for[  H (rest (range 0 1000))
        X (range 0 101) 
        Y (range 0 101)
        :when (every? true? (map #(MiniPyramid X Y H %) ls))]
    (list X Y H))))



(defn input[N]
  (when-not (zero? N)
    (cons [(int(read)) (int(read)) (int(read))]      
      (input (dec N)))))
(-> (read) int input Pyramid)