from decimal import Decimal



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

res = 0

for _ in range(n):

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

    if (x**2 + y**2).sqrt() <= d:

        res += 1

print(res)

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

res = 0

for _ in range(n):

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

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

        res += 1

print(res)

from decimal import Decimal

n, d = list(map(int, input().split()))
res = 0
for _ in range(n):
    x, y = list(map(Decimal, input().split()))
    if (x**2 + y**2).sqrt() <= d:
        res += 1
print(res)

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

-from decimal import Decimal - -    x, y = list(map(Decimal, input().split())) -    if (x**2 + y**2).sqrt() <= d: +    x, y = list(map(int, input().split())) +    if (x**2 + y**2) ** 0.5 <= d: