#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef unsigned long long ull; vector v[5000]; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector x(n),y(n); for(int i=0;i> x[i] >> y[i]; int nx=(x[i]-1)/9; int ny=(y[i]-1)/9; v[nx*60+ny].push_back(i+1); } vector res; for(int i=0;i<5000;i++){ if(v[i].size()){ res.push_back(v[i][0]); } } printf("%d\n",res.size()); for(int i=0;i