#include <bits/stdc++.h>
using namespace std;
const int N = 1001;
int n;
pair<int, int> p[N];
int parity(int a, int b) { return (a % 2) * 2 + (b % 2); }
vector<int> con[4], ans;
void merge(vector<int>& ans, vector<int>& v) {
  for (auto g : v) ans.push_back(g);
}
void construct() {
  for (int i = 0; i < 4; ++i) con[i].clear();
  for (int i = 0; i < n; ++i) {
    con[parity(p[i].first, p[i].second)].push_back(i + 1);
  }
}
void divideTwo() {
  for (int i = 0; i < n; ++i) p[i].first /= 2, p[i].second /= 2;
}
void print() {
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < ans.size(); ++i) {
    if (i) printf(" ");
    printf("%d", ans[i]);
  }
  puts("");
  exit(0);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &p[i].first, &p[i].second);
    p[i].first += 1e9;
    p[i].second += 1e9;
  }
  if (n == 2) {
    printf("1\n1\n");
    return 0;
  }
  while (((con[0].size() > 0) + (con[1].size() > 0) + (con[2].size() > 0) +
          (con[3].size() > 0)) <= 1) {
    construct();
    divideTwo();
  }
  if ((con[0].size() + con[3].size()) > 0 &&
      con[1].size() + con[2].size() > 0) {
    merge(ans, con[0]);
    merge(ans, con[3]);
    print();
  }
  for (int i = 0; i < 4; ++i) {
    if (con[i].size() > 0) {
      merge(ans, con[i]);
      print();
    }
  }
  return 0;
}
