#include <bits/stdc++.h>
using namespace std;
struct Node {
  int x, y;
  Node() {}
  Node(int _x, int _y) : x(_x), y(_y) {}
};
vector<int> g[2][2];
vector<int> res;
void solve() {
  int n;
  cin >> n;
  vector<Node> a(n);
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    a[i] = {x, y};
  }
  while (true) {
    for (int i = 0; i < 2; i++)
      for (int j = 0; j < 2; j++) g[i][j].clear();
    for (int i = 0; i < n; i++) {
      g[a[i].x & 1][a[i].y & 1].push_back(i);
    }
    int cnt = g[0][0].size() + g[1][1].size();
    if (cnt > 0 && cnt < n) {
      for (int x : g[0][0]) res.push_back(x);
      for (int x : g[1][1]) res.push_back(x);
      break;
    } else {
      if (cnt == n) {
        cnt = g[0][0].size();
        if (cnt > 0 && cnt < n) {
          for (int x : g[0][0]) res.push_back(x);
          break;
        }
      } else {
        cnt = g[0][1].size();
        if (cnt > 0 && cnt < n) {
          for (int x : g[0][1]) res.push_back(x);
          break;
        }
      }
    }
    for (auto& o : a) {
      if (o.x & 1) o.x += 1;
      if (o.y & 1) o.y += 1;
      o.x /= 2;
      o.y /= 2;
    }
  }
  cout << res.size() << "\n";
  for (int x : res) {
    cout << x + 1 << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  cout << endl;
}
