(def check (map #(Long/parseLong %) (.split (read-line) " ")))
(println (count (for [x (range (first check))
   :let [dist (map #(Long/parseLong %) (.split (read-line) " "))]
   :when (> (last check) (Math/sqrt (+ (* (first dist) (first dist)) (* (last dist) (last dist)))))] 1)