open System.Linq

let n, d =
    stdin.ReadLine().Split()
    |> fun ary -> int64 ary.[0], int64 ary.[1]

seq {
    for _ in 1L .. n do
        stdin.ReadLine().Split()
        |> Array.map int64
        |> fun ary -> ary.[0], ary.[1]
}
|> fun sq -> sq.Count(fun (x, y) -> (pown x 2 + pown y 2) <= pown d 2)
|> printfn "%d"
