#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> a;
int n;
int cnt[2][2];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i].first >> a[i].second;
    a[i].first += 1e6, a[i].second += 1e6;
    ++cnt[a[i].first % 2][a[i].second % 2];
  }
  while (true) {
    if (cnt[0][0] + cnt[1][1] > 0 && cnt[0][1] + cnt[1][0] > 0) {
      int res = 0;
      for (int i = 0; i < n; ++i)
        if (a[i].first % 2 == a[i].second % 2) ++res;
      cout << res << endl;
      for (int i = 0; i < n; ++i)
        if (a[i].first % 2 == a[i].second % 2) cout << i + 1 << " ";
      cout << endl;
      return 0;
    }
    if (cnt[0][0] + cnt[0][1] > 0 && cnt[1][0] + cnt[1][1] > 0) {
      int res = 0;
      for (int i = 0; i < n; ++i)
        if (a[i].first % 2 == 0) ++res;
      cout << res << endl;
      for (int i = 0; i < n; ++i)
        if (a[i].first % 2 == 0) cout << i + 1 << " ";
      cout << endl;
      return 0;
    }
    for (int i = 0; i < n; ++i) {
      --cnt[a[i].first % 2][a[i].second % 2];
      a[i].first /= 2;
      a[i].second /= 2;
      ++cnt[a[i].first % 2][a[i].second % 2];
    }
  }
  return 0;
}
