defmodule Main do
  def main do
    [n, d] = 
      IO.gets("")
      |> String.trim()
      |> String.split()
      |> Enum.map(&String.to_integer/1)
    
    IO.stream(:stdio, :line)
    |> Enum.map(&String.trim/1)
    |> Enum.map(&String.split/1)
    |> Enum.map(&Enum.map(&1, fn elem -> String.to_integer(elem) end))
    |> process(d, 0)
    |> IO.puts()
  end
  
  defp process([], _, acc), do: acc
  
  defp process([[x, y] | tail], d, acc) do
    case :math.sqrt(x*x + y*y) <= d do
      true ->
        process(tail, d, acc + 1)
      _ ->
        process(tail, d, acc)
    end
  end
end