#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cctype> #include<cstdlib> #include<algorithm> #include<bitset> #include<vector> #include<list> #include<deque> #include<queue> #include<map> #include<set> #include<stack> #include<cmath> #include<sstream> #include<fstream> #include<iomanip> #include<ctime> #include<complex> #include<functional> #include<climits> #include<cassert> #include<iterator> using namespace std; int n; set<int> s[20010]; int dist(int a, int b, int c, int d){ if (a < c){ swap(a, c); } if (b < d){ swap(b, d); } return (a - c)*(a - c) + (b - d)*(b - d); } int main(){ scanf("%d", &n); set<int>::iterator ite; int countt = 0; for (int i = 0; i < n; i++){ int x, y; scanf("%d%d", &x, &y); int mint = max(0, x - 19); int maxt = x + 19; bool ok = false; for (int j = mint; j <= maxt; j++){ if (s[j].size() == 0){ continue; } ite = s[j].lower_bound(y); if (ite != s[j].end()){ if (dist(x,y,j,(*ite)) < 400){ ok = true; break; } } if (ite != s[j].begin()){ ite--; if (dist(x,y,j,(*ite)) < 400){ ok = true; break; } } } if (ok == false){ s[x].insert(y); countt++; } } printf("%d\n", countt); return 0; }