#include #include #define M 2000 #define POS(i,j) ((i)*(M+1)+(j)) typedef struct point2d{ int x,y; } point; int distance(const point *a,const point *b){ int dx=a->x-b->x; int dy=a->y-b->y; return dx*dx+dy*dy; } void run(void){ int n; scanf("%d",&n); const int m=M; point *bucket=(point *)calloc((m+1)*(m+1),sizeof(point)); int i,j; for(i=0;i<=m;i++){ for(j=0;j<=m;j++){ bucket[POS(i,j)].x=-20; bucket[POS(i,j)].y=-20; } } int cnt=0; while(n--){ point t; scanf("%d%d",&t.x,&t.y); int x=t.x/10; int y=t.y/10; int flag=1; int i,j; for(i=-2;i<=2;i++){ if(!(0<=x+i && x+i<=m)) continue; for(j=-2;j<=2;j++){ if(!(0<=y+j && y+j<=m)) continue; if(distance(bucket+POS(x+i,y+j),&t)<20*20){ flag=0; } } } if(flag){ cnt++; bucket[POS(x,y)]=t; } } printf("%d\n",cnt); } int main(void){ run(); return 0; }