n, d = list(map(int,input().split()))

ans =0

for i in range(n):

    x, y = list(map(int,input().split()))

    if pow((x**2+y**2),0.5)<=d:

        ans += 1



print(ans)
import sys



N, D = list(map(int, input().split()))

cnt = 0

for s in sys.stdin.readlines():

    x, y = list(map(int, s.split()))

    d = pow(x, 2) + pow(y, 2)

    cnt += (d <= pow(D, 2))

print(cnt)
n, d = list(map(int, input().split()))
ans = 0
for i in range(n):
    x, y = list(map(int, input().split()))
    if pow((x**2 + y**2), 0.5) <= d:
        ans += 1
print(ans)

import sys

N, D = list(map(int, input().split()))
cnt = 0
for s in sys.stdin.readlines():
    x, y = list(map(int, s.split()))
    d = pow(x, 2) + pow(y, 2)
    cnt += d <= pow(D, 2)
print(cnt)

-n, d = list(map(int, input().split())) -ans = 0 -for i in range(n): -    x, y = list(map(int, input().split())) -    if pow((x**2 + y**2), 0.5) <= d: -        ans += 1 -print(ans) +import sys + +N, D = list(map(int, input().split())) +cnt = 0 +for s in sys.stdin.readlines(): +    x, y = list(map(int, s.split())) +    d = pow(x, 2) + pow(y, 2) +    cnt += d <= pow(D, 2) +print(cnt)