N, K = map(int, input().split()) H = list(map(int, input().split())) ps = [] for _ in range(N): X, Y = map(int, input().split()) ps.append((X, Y)) def is_match(h1, p1, h2, p2) -> bool: if h1 >= h2: return False d = (p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2 return d <= K * K s = set() for i in range(N): for j in range(N): if is_match(H[i], ps[i], H[j], ps[j]): s.add(i) print(N - len(s))