#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; using ii = pair; const int nax = 1001; vector b[nax][nax]; bool valid(int i, int j) { return 0 <= i && i < nax && 0 <= j && j < nax; } int dist2(int x, int y, int xx, int yy) { return (x - xx) * (x - xx) + (y - yy) * (y - yy); } int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; int xx = x / 20; int yy = y / 20; int ok = 1; for (int dx = -1; dx <= 1; dx++) { for (int dy = -1; dy <= 1; dy++) { if (valid(xx + dx, yy + dy)) { for (ii k: b[xx + dx][yy + dy]) { if (dist2(k.first, k.second, x, y) < 400) { ok = 0; } } } } } if (ok) { b[xx][yy].push_back(ii(x, y)); } } int cnt = 0; for (int i = 0; i < nax; i++) { for (int j = 0; j < nax; j++) { cnt += b[i][j].size(); } } cout << cnt << endl; }