import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
n,k = map(int,input().split())
h = list(map(int,input().split()))
#alist = []
a = []
for i in range(n):
    x,y = map(int,input().split())
    a.append([h[i],x,y])
a.sort()
ans = [1 for i in range(n)]
cnt = 0
for z,x,y in a:
    for j in range(cnt):
        if a[j][0] < z and (x-a[j][1])**2 + (y-a[j][2])**2 <= k**2:
            ans[j] = 0
    cnt += 1
print(sum(ans))