#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { ll n, k; cin >> n >> k; vector a(n); rep(i, n) cin >> a[i]; vector> v(n); rep(i, n) cin >> v[i].first >> v[i].second; int ans = n; rep(i, n) rep(j, n) { auto [x1, y1] = v[i]; auto [x2, y2] = v[j]; if ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) <= k * k && a[i] < a[j]) { ans--; break; } } cout << ans << endl; return 0; }