def max(a, b); a < b ? b : a; end
def min(a, b); a < b ? a : b; end

class Problem
  attr_accessor *(?a..?z).to_a.map(&:to_sym)

  def initialize
    @n,@d = gets.to_s.split.map{ |v| v.to_i }
    @p = Array.new(n){ gets.to_s.split.map{ |v| v.to_i } }
  end

  def solve
    dd = d * d
    ans = 0
    n.times do |i|
      x,y = @p[i]
      ans += 1 if dist2(y,x) <= dd
    end
    ans
  end

  def dist2(y, x)
    y ** 2 + x ** 2
  end

  def show(ans)
    puts ans
  end
end

Problem.new.instance_eval do
  show(solve)
end
