#include <bits/stdc++.h>
using namespace std;
inline void solve() {
  int n;
  cin >> n;
  vector<pair<int, int> > d(n);
  for (int i = 0; i < (n); i++) cin >> d[i].first >> d[i].second;
  if (n == 2) {
    cout << 1 << '\n' << 1;
    return;
  }
  int ee = 0, oo = 0, eo = 0, oe = 0;
  int p = 1;
  while (1) {
    for (int i = 0; i < (n); i++) {
      if (p != 1) {
        if (d[i].first % 2) d[i].first--;
        if (d[i].second % 2) d[i].second--;
      }
      d[i].first /= p;
      d[i].second /= p;
      if (abs(d[i].first % 2) == 1 && abs(d[i].second % 2) == 1)
        oo++;
      else if (abs(d[i].first % 2) == 0 && abs(d[i].second % 2) == 0)
        ee++;
      else if (abs(d[i].first % 2) == 1 && abs(d[i].second % 2) == 0)
        oe++;
      else
        eo++;
    }
    int k = 0;
    if (oo) k++;
    if (oe) k++;
    if (eo) k++;
    if (ee) k++;
    if (k > 1) break;
    p = 2;
    oo = 0;
    ee = 0;
    oe = 0;
    eo = 0;
  }
  if (eo + oe == 0) {
    cout << oo << '\n';
    for (int i = 0; i < (n); i++) {
      if (abs(d[i].first % 2) == 1 && abs(d[i].second % 2) == 1)
        cout << i + 1 << ' ';
    }
  } else if (oo + ee == 0) {
    cout << eo << '\n';
    for (int i = 0; i < (n); i++) {
      if (abs(d[i].first % 2) == 0 && abs(d[i].second % 2) == 1)
        cout << i + 1 << ' ';
    }
  } else {
    cout << oe + eo << '\n';
    for (int i = 0; i < (n); i++) {
      if (abs((d[i].first + d[i].second) % 2) == 1) cout << i + 1 << ' ';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
