#include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef ONLINE_JUDGE //POJ # include # include # define mkt make_tuple # define empb emplace_back #endif #ifdef _LOCAL # include "for_local.h" #endif using namespace std; typedef unsigned int uint; typedef unsigned long long ull; #define repi(_I, _B, _E) for(int _I = (_B); (_I) < (_E); ++ (_I)) #define rep(_I, _N) for(int _I = 0; (_I) < (_N); ++ (_I)) #define mkp make_pair #define all(_X) (_X).begin(), (_X).end() #define scani(_V) std::scanf("%d", &_V) #define printi(_V) std::printf("%d", static_cast(_V)) template T selfprod(T const& x, T const& y) { return x * x + y * y; } signed main() { int n; cin >> n; int k = 0; vector> ps; vector> xs, ys; rep(i, n) { int x, y; cin >> x >> y; bool ok = true; vector vb(n, false); auto&& ranx = mkp(upper_bound(all(xs), mkp(x - 20, 0)), lower_bound(all(xs), mkp(x + 20, 0))); auto&& rany = mkp(upper_bound(all(ys), mkp(y - 20, 0)), lower_bound(all(ys), mkp(y + 20, 0))); for ( auto it = ranx.first; it != ranx.second; ++it ) { vb[it->second] = true; } for ( auto it = rany.first; it != rany.second; ++it ) { if ( vb[it->second] ) { auto const& p = ps[it->second]; if ( selfprod(x - p.first, y - p.second) < ((10*2)*(10*2)) ) { ok = false; break; } } } if ( ok ) { ps.emplace_back(x, y); xs.emplace(lower_bound(all(xs), mkp(x, k)), mkp(x, k)); ys.emplace(lower_bound(all(ys), mkp(y, k)), mkp(y, k)); ++k; } } cout << k << endl; return 0; }