#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 999;
int x[maxn];
int y[maxn];
vector<int> v[5];
vector<int> vv[2];
inline int id(int a, int b) { return ((a & 1) << 1) + (b & 1); }
void solve() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &x[i], &y[i]);
    x[i] += 1e6 + 999;
    y[i] += 1e6 + 999;
  }
  while (1) {
    v[0].clear();
    v[1].clear();
    v[2].clear();
    v[3].clear();
    vv[0].clear();
    vv[1].clear();
    for (int i = 1; i <= n; i++) {
      v[id(x[i], y[i])].push_back(i);
      vv[(x[i] + y[i]) % 2].push_back(i);
    }
    int siz0 = v[0].size();
    int siz1 = v[1].size();
    int siz2 = v[2].size();
    int siz3 = v[3].size();
    if (!vv[0].empty() && !vv[1].empty()) {
      printf("%d\n", vv[0].size());
      for (int aa : vv[0]) printf("%d ", aa);
      break;
    } else if (siz1 && siz2) {
      printf("%d\n", siz1);
      for (int aa : v[1]) printf("%d ", aa);
      break;
    } else if (siz0 && siz3) {
      printf("%d\n", siz0);
      for (int aa : v[0]) printf("%d ", aa);
      break;
    } else {
      for (int i = 1; i <= n; i++) {
        x[i] /= 2;
        y[i] /= 2;
      }
    }
  }
}
signed main() { solve(); }
