#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<pair<int, int> > v(n);
  for (auto& i : v) {
    cin >> i.first >> i.second;
    i.first += 1e6;
    i.second += 1e6;
  }
  while (true) {
    vector<vector<int> > cnt(2, vector<int>(2));
    for (auto& i : v) cnt[i.first % 2][i.second % 2]++;
    if (cnt[0][0] + cnt[1][1] && cnt[0][1] + cnt[1][0]) {
      cout << cnt[0][0] + cnt[1][1] << '\n';
      for (int i = 0; i < v.size(); i++)
        if ((v[i].first + v[i].second) % 2 == 0) cout << i + 1 << ' ';
      cout << '\n';
      return;
    }
    if (cnt[0][0] + cnt[0][1] && cnt[1][1] + cnt[1][0]) {
      cout << cnt[0][0] + cnt[0][1] << '\n';
      for (int i = 0; i < v.size(); i++)
        if (v[i].first % 2 == 0) cout << i + 1 << ' ';
      cout << '\n';
      return;
    }
    int x, y;
    for (int i = 0; i < 2; i++)
      for (int j = 0; j < 2; j++)
        if (cnt[i][j]) {
          x = i;
          y = j;
        }
    for (auto& i : v) {
      i = {(i.first - x) / 2, (i.second - y) / 2};
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  while (t--) {
    solve();
  }
}
