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

xy = []

for i in range(n):

  a, b = list(map(int, input().split()))

  xy.append([a, b])

 

count = [xi**2 + yi**2 <= d**2 for xi, yi in xy]

 

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

xy = 0

for i in range(n):

  xi, yi = list(map(int, input().split()))

  xy += xi**2 + yi**2 <= d**2

 

print(xy)
n, d = list(map(int, input().split()))
xy = []
for i in range(n):
    a, b = list(map(int, input().split()))
    xy.append([a, b])
count = [xi**2 + yi**2 <= d**2 for xi, yi in xy]
print((sum(count)))

n, d = list(map(int, input().split()))
xy = 0
for i in range(n):
    xi, yi = list(map(int, input().split()))
    xy += xi**2 + yi**2 <= d**2
print(xy)

-xy = [] +xy = 0 -    a, b = list(map(int, input().split())) -    xy.append([a, b]) -count = [xi**2 + yi**2 <= d**2 for xi, yi in xy] -print((sum(count))) +    xi, yi = list(map(int, input().split())) +    xy += xi**2 + yi**2 <= d**2 +print(xy)