#include <bits/stdc++.h>
using namespace std;
long long mod1 = 1e17 + 3;
long long mod = 1e9 + 7;
const long long N = 5e3 + 10;
const long long maxi = 1e6 + 7;
long long n;
pair<long long, long long> a[N];
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  for (int i = 0; i < n; i++) a[i].first += maxi, a[i].second += maxi;
  set<int> ans;
  while (1) {
    for (int i = 0; i < n; i++)
      if ((a[i].first + a[i].second) & 1) ans.insert(i);
    if ((long long)ans.size() % n == 0) {
      for (int i = 0; i < n; i++) {
        int x = a[i].first, y = a[i].second;
        a[i] = make_pair((x + y) >> 1, (x - y) >> 1);
      }
      ans.clear();
    } else {
      cout << ans.size() << endl;
      for (auto it : ans) cout << it + 1 << " ";
      return;
    }
  }
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
