#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; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector x(n),y(n); map,vector> mp; for(int i=0;i> x[i] >> y[i]; mp[make_pair(x[i]%10,y[i]%10)].push_back(i+1); } vector res; for(auto p:mp){ if(p.second.size()>res.size()){ res=p.second; } } printf("%d\n",res.size()); for(int i=0;i