(defn parse-input [s]
  (mapv #(Integer/parseInt %) (clojure.string/split s #" ")))

(defn to-range [[x l]]
  [(+ x l) (- x l)])

(defn to-ranges [ coll ]
  (map #(to-range %) coll))

(defn yyy [xls]
  (reduce (fn [res [x1 x2 :as x]]
             (if-let [[lx1 lx2] (last res)]
               (if (<= lx1 x2)
                 (conj res x)
                 res)
               (conj res x)))
          [] (sort (to-ranges xls))))

(def in-robos
  (for [x (range (Integer/parseInt (read-line)))]
    (parse-input (read-line))))

(println (-> in-robos
             (yyy)))
