#include using namespace std; int main(){ int N; cin >> N; vector X(N), Y(N); for (int i = 0; i < N; i++){ cin >> X[i] >> Y[i]; } vector> group(90); for (int i = 0; i < N; i++){ X[i] %= 10; Y[i] %= 18; int g = 0; if (X[i] >= 5){ g ^= 45; X[i] -= 5; } if (Y[i] >= 9){ g ^= 45; Y[i] -= 9; } g += X[i] * 9 + Y[i]; group[g].push_back(i); } int mx_g = 0; for (int i = 1; i < 90; i++){ if (group[i].size() > mx_g){ mx_g = i; } } int K = group[mx_g].size(); cout << K << endl; for (int i = 0; i < K; i++){ cout << group[mx_g][i] + 1; if (i < K - 1){ cout << ' '; } } cout << endl; }