#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long m, long long mod) {
  long long ans = 1;
  while (m) {
    if (m % 2) {
      ans *= a;
      ans %= (mod);
    }
    a = (a * a) % (mod);
    m >>= 1;
  }
  return ans;
}
void init(long long* a, long long n, long long val) {
  for (long long i = 0; i < n; i++) a[i] = val;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1, i, j;
  long long n;
  cin >> n;
  long long b[4] = {0};
  long long x[n], y[n];
  for (i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
    x[i] += 1000000;
    y[i] += 1000000;
    b[((x[i]) % 2) * 2 + ((y[i]) % 2)]++;
  }
  t = 0;
  for (i = 0; i < 4; i++) {
    t += (bool)b[i];
  }
  while (t < 2) {
    init(b, 4, 0);
    for (i = 0; i < n; i++) {
      x[i] /= 2;
      y[i] /= 2;
      b[((x[i]) % 2) * 2 + ((y[i]) % 2)]++;
    }
    t = 0;
    for (i = 0; i < 4; i++) {
      t += (bool)b[i];
    }
  }
  if ((b[0] || b[3]) && (b[1] || b[2])) {
    cout << b[0] + b[3] << endl;
    for (i = 0; i < n; i++) {
      if (((x[i]) % 2) * 2 + ((y[i]) % 2) == 0 ||
          ((x[i]) % 2) * 2 + (abs(y[i]) % 2) == 3) {
        cout << i + 1 << " ";
      }
    }
  } else if (b[0]) {
    cout << b[0] << endl;
    for (i = 0; i < n; i++) {
      if (!(((x[i]) % 2) * 2 + ((y[i]) % 2))) cout << i + 1 << " ";
    }
  } else {
    cout << b[1] << endl;
    for (i = 0; i < n; i++)
      if (((x[i]) % 2) * 2 + ((y[i]) % 2) == 1) cout << i + 1 << " ";
  }
  return 0;
}
