lines = []
while line = gets
    lines << line.chomp.split(' ').map(&:to_i)
end

N = lines[0][0]
D = lines[0][1]

ans = 0
for i in 1..N do
  if lines[i][0] ** 2 + lines[i][1] ** 2 <= D ** 2 then
    ans += 1
  end
end
  
puts ans