#include #include #include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint16_t N, i, j; int32_t K; cin >> N >> K; vector> shrines(N); for (i = 0; i != N; ++i) cin >> get<0>(shrines[i]); for (i = 0; i != N; ++i) cin >> get<1>(shrines[i]) >> get<2>(shrines[i]); sort(shrines.begin(), shrines.end()); uint16_t count_deleted = 0; vector is_deleted(N, false); for (i = 0; i != N; ++i) if (!is_deleted[i]) for (j = 0; j != i; ++j) if (!is_deleted[j] && get<0>(shrines[i]) != get<0>(shrines[j]) && static_cast(get<1>(shrines[i]) - get<1>(shrines[j])) * (get<1>(shrines[i]) - get<1>(shrines[j])) + static_cast(get<2>(shrines[i]) - get<2>(shrines[j])) * (get<2>(shrines[i]) - get<2>(shrines[j])) <= static_cast(K) * K) is_deleted[j] = true, ++count_deleted; cout << N - count_deleted << '\n'; return 0; }