#include using namespace std; typedef long long ll; typedef pair P; const ll MOD = 1e9+7; const ll INF = 1e18; #define rep(i,m,n) for(ll i = (m); i <= (n); i++) #define zep(i,m,n) for(ll i = (m); i < (n); i++) #define rrep(i,m,n) for(ll i = (m); i >= (n); i--) #define print(x) cout << (x) << endl; #define printa(x,m,n) for(int i = (m); i <= n; i++){cout << (x[i]) << " ";} cout<> n; ll x[n], y[n]; zep(i, 0, n)cin >> x[i] >> y[i]; vector v[10][10]; zep(i, 0, n){ v[x[i] % 9][y[i] % 9].push_back(i + 1); } ll mx = 0, mi = -1, mj = -1; zep(i, 0, 9){ zep(j, 0, 9){ if(v[i][j].size() > mx){ mx = v[i][j].size(); mi = i; mj = j; } } } print(mx) zep(k, 0, mx)cout << v[mi][mj][k] << " "; cout << endl; return 0; }