#include <bits/stdc++.h>
using namespace std;
inline char nc() {
  return getchar();
  static char buf[100000], *l = buf, *r = buf;
  return l == r && (r = (l = buf) + fread(buf, 1, 100000, stdin), l == r)
             ? EOF
             : *l++;
}
template <class T>
void read(T &x) {
  x = 0;
  int f = 1, ch = nc();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = nc();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 - '0' + ch;
    ch = nc();
  }
  x *= f;
}
const int maxn = 1000 + 5;
int n;
int x[maxn];
int y[maxn];
vector<int> A[2][2];
int main() {
  read(n);
  for (int i = 1; i <= n; ++i) {
    read(x[i]), read(y[i]);
  }
  while (true) {
    for (int i = 0; i < 2; ++i)
      for (int j = 0; j < 2; ++j) {
        A[i][j].clear();
      }
    for (int i = 1; i <= n; ++i) {
      int a = bool(x[i] % 2), b = bool(y[i] % 2);
      A[a][b].push_back(i);
    }
    int a = -1, b = -1;
    for (int i = 0; i < 2; ++i) {
      for (int j = 0; j < 2; ++j)
        if (A[i][j].size()) {
          if (a == -1)
            a = i, b = j;
          else
            a = -2;
        }
    }
    if (a >= 0) {
      for (int i = 0; i < A[a][b].size(); ++i) {
        int u = A[a][b][i];
        x[u] = (x[u] - a) / 2;
        y[u] = (y[u] - b) / 2;
      }
      continue;
    }
    if (A[0][0].size() + A[1][1].size() && A[0][1].size() + A[1][0].size()) {
      printf("%d\n", int(A[0][0].size() + A[1][1].size()));
      bool flag = 0;
      for (int i = 0; i < A[0][0].size(); ++i) {
        if (flag)
          printf(" ");
        else
          flag = 1;
        printf("%d", A[0][0][i]);
      }
      for (int i = 0; i < A[1][1].size(); ++i) {
        if (flag)
          printf(" ");
        else
          flag = 1;
        printf("%d", A[1][1][i]);
      }
      printf("\n");
      break;
    }
    if (A[0][0].size() + A[1][1].size()) {
      printf("%d\n", int(A[0][0].size()));
      for (int i = 0; i < A[0][0].size(); ++i) {
        if (i) printf(" ");
        printf("%d", A[0][0][i]);
      }
      printf("\n");
      break;
    }
    if (A[0][1].size() + A[1][0].size()) {
      printf("%d\n", int(A[0][1].size()));
      for (int i = 0; i < A[0][1].size(); ++i) {
        if (i) printf(" ");
        printf("%d", A[0][1][i]);
      }
      printf("\n");
      break;
    }
  }
  return 0;
}
