import math

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

X = [list(map(int,input().split())) for i in range(N)]



ans = 0

for i in range(N):

    if math.sqrt((X[i][0])**2+(X[i][1])**2) <= D:

        ans += 1

        

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



ans = 0

for i in range(N):

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

    if X**2 + Y ** 2 <= D**2:

        ans += 1



print(ans)
import math

N, D = list(map(int, input().split()))
X = [list(map(int, input().split())) for i in range(N)]
ans = 0
for i in range(N):
    if math.sqrt((X[i][0]) ** 2 + (X[i][1]) ** 2) <= D:
        ans += 1
print(ans)

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

-import math - -X = [list(map(int, input().split())) for i in range(N)] -    if math.sqrt((X[i][0]) ** 2 + (X[i][1]) ** 2) <= D: +    X, Y = list(map(int, input().split())) +    if X**2 + Y**2 <= D**2: