#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
const long long maxn = 1e3 + 10, N = 1e6 + 10, SQ = 1000, base = 800287,
                mod = 1e9 + 7, INF = 1e9 + 10, lg = 22;
const long double eps = 1e-4;
long long n, x[maxn], y[maxn], mark[maxn];
vector<long long> v1, v2, v3, v4;
void do_type1() {
  for (auto u : v1) mark[u] = 1;
  for (auto u : v2) mark[u] = 1;
  for (auto u : v3) mark[u] = 2;
  for (auto u : v4) mark[u] = 2;
}
void do_type2() {
  for (auto u : v1) mark[u] = 1;
  for (auto u : v2) mark[u] = 2;
}
void do_type3() {
  for (auto u : v3) mark[u] = 1;
  for (auto u : v4) mark[u] = 2;
}
void calc() {
  v1.clear();
  v2.clear();
  v3.clear();
  v4.clear();
  for (long long i = 0; i < n; ++i) {
    if (!(x[i] & 1) && !(y[i] & 1)) {
      v1.push_back(i);
    } else if ((x[i] & 1) && (y[i] & 1)) {
      v2.push_back(i);
    } else if (!(x[i] & 1) && (y[i] & 1)) {
      v3.push_back(i);
    } else {
      v4.push_back(i);
    }
  }
  if ((long long)v1.size() + (long long)v2.size() &&
      (long long)v3.size() + (long long)v4.size()) {
    do_type1();
    return;
  } else if ((long long)v1.size() && (long long)v2.size()) {
    do_type2();
    return;
  } else if ((long long)v3.size() && (long long)v4.size()) {
    do_type3();
    return;
  } else {
    for (long long i = 0; i < n; ++i) {
      x[i] = (x[i] + 1) / 2;
      y[i] = (y[i] + 1) / 2;
    }
    calc();
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
    x[i] += N, y[i] += N;
  }
  calc();
  vector<long long> ans;
  for (long long i = 0; i < n; ++i) {
    if (mark[i] == 1) {
      ans.push_back(i);
    }
  }
  cout << (long long)ans.size() << '\n';
  for (auto u : ans) {
    cout << u + 1 << ' ';
  }
  cout << '\n';
}
