#include #define rep(i,n) for(int i=0;i<(n);++i) using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll n,k; cin >> n >> k; vector h(n); rep(i,n) cin >> h[i]; vector> z(n); rep(i,n){ int x,y; cin >> x >> y; z[i] = complex(x,y); } vector cnt(n,0); rep(i,n){ rep(j,n){ if(h[i]>h[j] && norm(z[i]-z[j])<=k*k){ cnt[j]++; } } } int ans = 0; rep(i,n) if(cnt[i]==0) ans++; cout << ans << endl; }