#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; struct Coord { int y; int x; Coord(int y = -1, int x = -1){ this->y = y; this->x = x; } }; vector field[1001][1001]; int main(){ int n; cin >> n; int x, y; int cnt = 0; for(int i = 0; i < n; i++){ cin >> x >> y; int cy = y/20; int cx = x/20; bool success = true; for(int curY = cy-1; curY <= cy+1 && success; curY++){ for(int curX = cx-1; curX <= cx+1 && success; curX++){ if(curY < 0 || 1001 <= curY || curX < 0 || 1001 <= curX) continue; int size = field[curY][curX].size(); for(int j = 0; j < size; j++){ Coord coord = field[curY][curX][j]; int dy = coord.y - y; int dx = coord.x - x; int dist = dy*dy + dx*dx; if(dist < 400){ success = false; } } } } if(success){ field[cy][cx].push_back(Coord(y,x)); cnt++; } } cout << cnt << endl; return 0; }