N,K = list(map(int,input().split())) H = list(map(int,input().split())) a = [] for i in range(N): x,y = list(map(int,input().split())) a.append((x,y,i)) a.sort(key=lambda x:H[x[2]]) ans = set() for x,y,idx in a: flag = True remove_memo = [] for xx,yy,idx2 in ans: if((x-xx)*(x-xx) + (y-yy)*(y-yy) <= K*K and H[idx] > H[idx2]): remove_memo.append((xx,yy,idx2)) for xx,yy,idx2 in remove_memo: ans.remove((xx,yy,idx2)) ans.add((x,y,idx)) print(len(ans))