#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int n;
int x[1010], y[1010];
vector<int> v;
set<int> s;
void init() {
  v.clear();
  s.clear();
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= int(n); i++) {
    cin >> x[i] >> y[i];
    x[i] += 1000002;
    y[i] += 1000002;
  }
  int cur = 2;
  while (1) {
    init();
    int cnt = 0;
    for (int i = 1; i <= int(n); i++) s.insert((x[i] + y[i]) % cur);
    if (s.size() > 1) {
      int tar = *(s.begin());
      for (int i = 1; i <= int(n); i++)
        if ((x[i] + y[i]) % cur == tar) v.push_back(i);
      cout << v.size() << endl;
      for (int i = 0; i < int(v.size()); i++) cout << v[i] << " ";
      cout << endl;
      return 0;
    }
    init();
    cnt = 0;
    for (int i = 1; i <= int(n); i++) s.insert((x[i]) % cur);
    if (s.size() > 1) {
      int tar = *(s.begin());
      for (int i = 1; i <= int(n); i++)
        if ((x[i]) % cur == tar) v.push_back(i);
      cout << v.size() << endl;
      for (int i = 0; i < int(v.size()); i++) cout << v[i] << " ";
      cout << endl;
      return 0;
    }
    cur <<= 1;
  }
}
