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

    input()
    |> count(d, n-1, 0)
    |> IO.puts()
  end

  def input do
    IO.gets("")
    |> String.trim()
    |> String.split()
    |> Enum.map(&String.to_integer/1)
    |> distance()
  end

  defp distance([x, y]) do
    :math.sqrt(x*x+y*y)
  end

  def count(_, _, 0, acc), do: acc

  def count(xy, d, n, acc) when xy <= d do
    count(input(), d, n-1, acc+1)
  end

  def count(_, d, n, acc) do
    count(input(), d, n-1, acc)
  end
end
