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

xy = [list(map(int, input().split())) for _ in range(a[0])]

x, y = [list(i) for i in zip(*xy)]

c = 0

for i in range(a[0]):

  if a[1]**2 >= x[i]**2 +y[i]**2:

    c += 1

print(c)
(n,d),*z = [list(map(int,t.split()))for t in open(0)]

print((sum(x*x+y*y<=d*d for x,y in z)))
a = list(map(int, input().split()))
xy = [list(map(int, input().split())) for _ in range(a[0])]
x, y = [list(i) for i in zip(*xy)]
c = 0
for i in range(a[0]):
    if a[1] ** 2 >= x[i] ** 2 + y[i] ** 2:
        c += 1
print(c)

(n, d), *z = [list(map(int, t.split())) for t in open(0)]
print((sum(x * x + y * y <= d * d for x, y in z)))

-a = list(map(int, input().split())) -xy = [list(map(int, input().split())) for _ in range(a[0])] -x, y = [list(i) for i in zip(*xy)] -c = 0 -for i in range(a[0]): -    if a[1] ** 2 >= x[i] ** 2 + y[i] ** 2: -        c += 1 -print(c) +(n, d), *z = [list(map(int, t.split())) for t in open(0)] +print((sum(x * x + y * y <= d * d for x, y in z)))