#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long>> inp(n);
  long long freq[2][2] = {0};
  for (long long i = 0; i < n; ++i) {
    cin >> inp[i].first >> inp[i].second;
    inp[i].first += 1000000;
    inp[i].second += 1000000;
    ++freq[inp[i].first % 2][inp[i].second % 2];
  }
  while (true) {
    if ((freq[0][0] + freq[1][1]) > 0 && (freq[0][1] + freq[1][0]) > 0) {
      vector<long long> fin;
      for (long long i = 0; i < n; ++i) {
        if (inp[i].first % 2 == inp[i].second % 2) {
          fin.push_back(i + 1);
        }
      }
      cout << fin.size() << "\n";
      for (auto it : fin) {
        cout << it << " ";
      }
      cout << "\n";
      return 0;
    } else {
      vector<long long> fin;
      if ((freq[0][0] > 0 && freq[1][1] > 0) ||
          (freq[1][0] > 0 && freq[0][1] > 0)) {
        for (long long i = 0; i < n; ++i) {
          if (inp[i].first % 2 == 0) {
            fin.push_back(i + 1);
          }
        }
        cout << fin.size() << "\n";
        for (auto it : fin) {
          cout << it << " ";
        }
        cout << "\n";
        return 0;
      } else {
        long long xx, yy;
        for (long long i = 0; i < 2; ++i) {
          for (long long j = 0; j < 2; ++j) {
            if (freq[i][j] > 0) {
              xx = i;
              yy = j;
            }
          }
        }
        freq[0][0] = 0;
        freq[0][1] = 0;
        freq[1][0] = 0;
        freq[1][1] = 0;
        for (long long i = 0; i < n; ++i) {
          inp[i].first -= xx;
          inp[i].second -= yy;
          inp[i].first /= 2;
          inp[i].second /= 2;
          ++freq[inp[i].first % 2][inp[i].second % 2];
        }
      }
    }
  }
}
