#include #define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++) const int dx[] = {1, 0, -1, 0}; const int dy[] = {0, 1, 0, -1}; using namespace std; typedef long long ll; typedef vector vi; typedef vector vll; typedef pair pii; const int MAXN = 122222; ll X[MAXN], Y[MAXN]; vector pos[2222][2222]; ll square(int x) {return x*x;} bool in(const pii& p, const pii& q) { return square(p.first-q.first) + square(p.second-q.second) < 20*20; } int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; for (int i = 0; i < N; i++) { cin >> X[i] >> Y[i]; } int ans = 0; for (int i = 0; i < N; i++) { int y = Y[i]/10; int x = X[i]/10; bool ng = false; for (int dx = -3; dx <= 3; dx++) { for (int dy = -3; dy <= 3; dy++) { int nx = x+dx; int ny = y+dy; if (nx < 0 || ny < 0) continue; for (auto p : pos[ny][nx]) { if (in(p, pii(Y[i], X[i]))) { ng = true; break; } } if (ng) break; } if (ng) break; } if (!ng) { ans++; pos[y][x].push_back(pii(Y[i], X[i])); } } cout << ans << endl; return 0; }