import math

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



lis = []

for i in range(n):

    p = list(map(int, input().split()))

    lis.append(p)



count = 0

for r in lis:

    distance = r[0] ** 2 + r[1] ** 2

    distance = math.sqrt(distance)

    if distance <= d:

        count += 1

    

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

d = d ** 2

count = 0

for i in range(n):

    p = list(map(int, input().split()))

    dis = p[0] ** 2 + p[1] ** 2

    if dis <= d:

        count += 1

print(count)
import math

n, d = list(map(int, input().split()))
lis = []
for i in range(n):
    p = list(map(int, input().split()))
    lis.append(p)
count = 0
for r in lis:
    distance = r[0] ** 2 + r[1] ** 2
    distance = math.sqrt(distance)
    if distance <= d:
        count += 1
print(count)

n, d = list(map(int, input().split()))
d = d**2
count = 0
for i in range(n):
    p = list(map(int, input().split()))
    dis = p[0] ** 2 + p[1] ** 2
    if dis <= d:
        count += 1
print(count)

-import math - -lis = [] +d = d**2 +count = 0 -    lis.append(p) -count = 0 -for r in lis: -    distance = r[0] ** 2 + r[1] ** 2 -    distance = math.sqrt(distance) -    if distance <= d: +    dis = p[0] ** 2 + p[1] ** 2 +    if dis <= d: