#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() template inline bool chmax(A &a, B b) { if (a inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; } typedef unsigned long long ull; typedef long long ll; typedef pair pii; typedef pair pll; typedef pair P; const ll INF = 1ll<<60; const ll MOD = 1000000007; const double EPS = 1e-10; int n; set sx[20001]; int main() { cin >> n; int ans = 0; REP(i, n) { int x, y; scanf("%d %d", &x, &y); bool ok = true; FOR(j, -20, 21) { if (!ok) break; int nx = x + j; if (nx >= 0 && nx <= 20000) { set::iterator it = sx[nx].lower_bound(y - 20); while (ok && it != sx[nx].end() && *it <= y + 20) { ll d = (x - nx) * (x - nx) + (y - *it) * (y - *it); if (d < 400) ok = false; it++; } } } if (ok) { ans++; sx[x].insert(y); } } cout << ans << endl; return 0; }