
defmodule Main do
  def main do
    [n, d] = IO.gets("")
             |> String.trim()
             |> String.split()
             |> Enum.map(&String.to_integer/1)

    xy = for _ <- 1..n, do: IO.gets("") |> String.trim() |> String.split()

    xy
    |> Enum.map(fn [x, y] -> [String.to_integer(x), String.to_integer(y)] end)
    |> Enum.map(fn [x, y] -> :math.sqrt(x*x+y*y) end)
    |> Enum.filter(&(&1<=d))
    |> length()
    |> IO.puts()
  end
end
