#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e3 + 21, inf = 1e18;
bool mrk[MAXN];
long long n;
long long x[MAXN], y[MAXN];
vector<int> ans;
long long dis(int a, int b) {
  long long res = 1LL * (x[a] - x[b]) * (x[a] - x[b]);
  res += 1LL * (y[a] - y[b]) * (y[a] - y[b]);
  return res;
}
void dfs(int root, long long md) {
  if (mrk[root]) return;
  mrk[root] = true;
  ans.push_back(root);
  for (int v = 1; v <= n; v++)
    if (v ^ root && dis(root, v) % md == 0) dfs(v, md);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (long long i = 2; i <= inf; i *= 2) {
    ans.clear();
    dfs(1, i);
    if (ans.size() ^ n && ans.size()) {
      cout << ans.size() << '\n';
      for (auto y : ans) cout << y << ' ';
      cout << '\n';
      return 0;
    }
    for (int i = 1; i <= n; i++) mrk[i] = false;
  }
  return 0;
}
