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



ct = 0

D2 = D * D

for i in range(N):

    X, Y = list(map(int, input().split()))

    if (X**2 + Y**2) <= D2:

        ct += 1



print(ct)
from sys import stdin



N, D = list(map(int, stdin.readline().split()))



ct = 0

D2 = D * D

for i in range(N):

    X, Y = list(map(int, stdin.readline().split()))

    if (X**2 + Y**2) <= D2:

        ct += 1



print(ct)
N, D = list(map(int, input().split()))
ct = 0
D2 = D * D
for i in range(N):
    X, Y = list(map(int, input().split()))
    if (X**2 + Y**2) <= D2:
        ct += 1
print(ct)

from sys import stdin

N, D = list(map(int, stdin.readline().split()))
ct = 0
D2 = D * D
for i in range(N):
    X, Y = list(map(int, stdin.readline().split()))
    if (X**2 + Y**2) <= D2:
        ct += 1
print(ct)

-N, D = list(map(int, input().split())) +from sys import stdin + +N, D = list(map(int, stdin.readline().split())) -    X, Y = list(map(int, input().split())) +    X, Y = list(map(int, stdin.readline().split()))