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

d = d*d

ans = 0



for i in range(n):

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

    if d >= x*x + y*y:

        ans += 1



print(ans)
import sys

input = sys.stdin.readline



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

d = d*d

ans = 0



for i in range(n):

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

    if d >= x*x + y*y:

        ans += 1



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

import sys

input = sys.stdin.readline
n, d = list(map(int, input().split()))
d = d * d
ans = 0
for i in range(n):
    x, y = list(map(int, input().split()))
    if d >= x * x + y * y:
        ans += 1
print(ans)

+import sys + +input = sys.stdin.readline