#include <bits/stdc++.h>
using namespace std;
pair<int, int> point[1005];
int cnt[5][5];
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> point[i].first >> point[i].second;
    point[i].first += 1000000;
    point[i].second += 1000000;
  }
  while (1) {
    memset(cnt, 0, sizeof(cnt));
    for (int i = 1; i <= n; i++) {
      cnt[point[i].first % 2][point[i].second % 2]++;
    }
    if (cnt[0][0] + cnt[1][1] > 0 && cnt[0][1] + cnt[1][0] > 0) {
      printf("%d\n", cnt[0][0] + cnt[1][1]);
      for (int i = 1; i <= n; i++) {
        if (point[i].first % 2 == point[i].second % 2) {
          printf("%d ", i);
        }
      }
      break;
    }
    if (cnt[0][0] + cnt[0][1] > 0 && cnt[1][0] + cnt[1][1] > 0) {
      printf("%d\n", cnt[0][0] + cnt[0][1]);
      for (int i = 1; i <= n; i++) {
        if (point[i].first % 2 == 0) printf("%d ", i);
      }
      break;
    }
    for (int i = 1; i <= n; i++) {
      point[i].first /= 2;
      point[i].second /= 2;
    }
  }
}
