#include #include #include #include #include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template constexpr T INF = ::numeric_limits::max() / 32 * 15 + 208; template vector make_v(U size, const T& init){ return vector(static_cast(size), init); } template auto make_v(U size, Ts... rest) { return vector(static_cast(size), make_v(rest...)); } template void chmin(T &a, const T &b){ a = (a < b ? a : b); } template void chmax(T &a, const T &b){ a = (a > b ? a : b); } int main() { auto dp = make_v(5004, 5004, make_pair(-1, -1)); int n; cin >> n; pair D = {-1, -1}; int ans = 0; for (int i = 0; i < n; ++i) { int x, y; cin >> x >> y; int ok = 1; int xx = x/10+2, yy = y/10+2; for (int dx = -2; dx <= 2; ++dx) { for (int dy = -2; dy <= 2; ++dy) { if(dp[xx+dx][yy+dy] != D){ int px, py; tie(px, py) = dp[xx+dx][yy+dy]; if((px-x)*(px-x)+(py-y)*(py-y) < 400){ ok = 0; dx = 3, dy = 3; break; } } } } if(ok) ans++, dp[xx][yy] = {x, y}; } cout << ans << "\n"; return 0; }