require 'complex'
n, d = gets.split(" ").map(&:to_i)
data = n.times.map { gets.strip.split.map(&:to_i) }
cnt = 0

(0..n-1).each do |i|
  j = data[i][0]
  k = data[i][1]
  x = j**2 + k**2
  y = Math.sqrt(x)
  if y <= d
    cnt += 1
  end
end

puts cnt