def calc_distance(p, q)
  Math.sqrt((p ** 2) + (q ** 2))
end

n, d = gets.chomp.split(' ').map(&:to_i)
count = 0
values = []
caches = {}
n.times do
  value = gets.chomp
  result = caches[value]
  unless result
    x, y = value.split(' ').map(&:to_i)
    distance = calc_distance(x, y)
    result = distance <= d
    caches[value] = result
  end
  count += 1 if result
end

puts count