class Distance
  def initialize(d, axy)
    @d = d
    @axy = axy
  end

  def solve
    @axy.reduce(0) {|ct, xy| if @d * @d >= xy[0] * xy[0] + xy[1] * xy[1] then ct + 1 else ct end}
  end
end

def run
  n, d = gets.split(/\s+/).map(&:to_i)
  axy = (0...n).map{|_| gets.split(/\s+/).map(&:to_i)}
  
  puts Distance.new(d, axy).solve
end

run
