open Printf
open Scanf

let solve n d =
  let lxy = List.init n @@ fun _ -> scanf "%d %d " @@ fun x y -> (x, y) in
  let f ct (x, y) = if d * d >= x * x + y * y then ct + 1 else ct in
  List.fold_left f 0 lxy

let () =
  scanf "%d %d " solve |> printf "%d\n"
