"""input""" #int-input # input = sys.stdin.readline def II(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(MI()) #str-input def SI(): return input() def MSI(): return input().split() def SI_L(): return list(SI()) def SI_LI(): return list(map(int, SI())) #multiple-input def LLI(n): return [LI() for _ in range(n)] def LSI(n): return [SI() for _ in range(n)] #1-indexを0-indexでinput def MI_1(): return map(lambda x:int(x)-1, input().split()) def TI_1(): return tuple(MI_1()) def LI_1(): return list(MI_1()) class dsu(): n=1 parent_or_size=[-1 for i in range(n)] def __init__(self,N): self.n=N self.parent_or_size=[-1 for i in range(N)] def merge(self,a,b): assert 0<=a0: result2.append(result[i]) return result2 n,k = MI() h = LI() p = LLI(n) uf = dsu(n) def dis(p,q): return (p[0]-q[0])**2 + (p[1]-q[1])**2 edge = [set() for i in range(n)] for i in range(n): for j in range(n): if h[i] < h[j] and dis(p[i],p[j]) <= k**2: edge[i].add(j) ans = 0 for i in range(n): if edge[i] == set(): ans += 1 print(ans)