open Batteries
let n, d = Scanf.sscanf (read_line()) "%d %f" (fun n d -> n,d)

let rec loop i result =
  if i >= n then result else (
    Scanf.sscanf (read_line()) "%d %d" (fun x y -> 
      if d >= (sqrt (float_of_int @@ x * x + y * y)) then loop (i+1) (result+1) else loop (i+1) result
    )
  )
let () = Printf.printf "%d\n" @@ loop 0 0