#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  int a[n][2];
  for (int i = 0; i < n; ++i) {
    cin >> a[i][0] >> a[i][1];
    a[i][0] += 1e6;
    a[i][1] += 1e6;
  }
  while (1) {
    int cnt[2][2];
    cnt[0][0] = cnt[0][1] = cnt[1][0] = cnt[1][1] = 0;
    for (int i = 0; i < n; ++i) {
      cnt[a[i][0] % 2][a[i][1] % 2]++;
    }
    if ((cnt[0][0] + cnt[1][1]) && (cnt[0][1] + cnt[1][0])) {
      cout << cnt[0][0] + cnt[1][1] << "\n";
      for (int i = 0; i < n; ++i) {
        if ((a[i][0] % 2) == (a[i][1] % 2)) cout << i + 1 << " ";
      }
      cout << "\n";
      return 0;
    }
    if (cnt[0][0] > 0 && cnt[1][1] > 0) {
      cout << cnt[0][0] << "\n";
      for (int i = 0; i < n; ++i) {
        if ((a[i][0] % 2) == 0 && (a[i][1] % 2) == 0) cout << i + 1 << " ";
      }
      cout << "\n";
      return 0;
    }
    if (cnt[0][1] > 0 && cnt[1][0] > 0) {
      cout << cnt[1][0] << "\n";
      for (int i = 0; i < n; ++i) {
        if ((a[i][0] % 2) == 1 && (a[i][1] % 2) == 0) cout << i + 1 << " ";
      }
      cout << "\n";
      return 0;
    }
    for (int i = 0; i < n; ++i) {
      int x = a[i][0] % 2;
      int y = a[i][1] % 2;
      a[i][0] = (a[i][0] - x) / 2;
      a[i][1] = (a[i][1] - y) / 2;
    }
  }
  return 0;
}
