(defn input []
  (letfn [(inner-func []
            (->> (clojure.string/split (read-line) #"\s")
              (map #(Integer/parseInt %))))]
    (let [[N H W] (inner-func)]
      (list N H W
        (repeatedly N inner-func)))))

(defn AtCoderAlloy [[N H W Items]]
  (->> Items
    (filter (fn [[A B]] (and (<= H A) (<= W B))))
    count))

(->> (input)
  AtCoderAlloy
  println)