def dist2(p1, p2): return abs(p1[0]-p2[0])**2 + abs(p1[1]-p2[1])**2 N, K = map(int, input().split()) H = tuple(map(int, input().split())) P = tuple(tuple(map(int, input().split())) for _ in range(N)) def ng(i, j): if H[i] >= H[j]: return False if dist2(P[i], P[j]) > K**2: return False return True idx = sorted(range(N), key=H.__getitem__) ok = [1]*N for i in range(N): if any(ng(idx[i], idx[j]) for j in range(i+1, N)): ok[idx[i]] = 0 print(sum(ok))