#include <bits/stdc++.h>
using namespace std;
vector<tuple<int, int, int> > v;
int n, x, y, ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    v.push_back(make_tuple(x, y, i));
  }
  while (1) {
    ans = 0;
    for (auto u : v) {
      if ((get<0>(u) + get<1>(u)) & 1) ans++;
    }
    if (ans and ans != n) {
      cout << ans << endl;
      int cnt = 0;
      for (auto u : v) {
        cnt++;
        if ((get<0>(u) + get<1>(u)) & 1) {
          cout << get<2>(u) << ' ';
        }
      }
      return 0;
    }
    for (auto& u : v) {
      int temp = get<0>(u);
      get<0>(u) = (temp + get<1>(u)) >> 1;
      get<1>(u) = (get<1>(u) - temp) >> 1;
    }
  }
  return 0;
}
