#include <bits/stdc++.h>
using namespace std;
static auto faster_iostream = []() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  return 0;
}();
class point {
 public:
  int x, y, num;
  int typ() {
    if (x % 2 == 1 && y % 2 == 1)
      return 3;
    else if (x % 2 == 1)
      return 2;
    else if (y % 2 == 1)
      return 1;
    else
      return 0;
  }
  void div() {
    x = x / 2;
    y = y / 2;
  }
};
const int d = 1e7;
int main() {
  int n;
  cin >> n;
  vector<point> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].x >> a[i].y;
    a[i].x += d;
    a[i].y += d;
    a[i].num = i + 1;
  }
  while (true) {
    vector<point> f[4];
    for (auto &p : a) f[p.typ()].push_back(p);
    if (f[0].empty() + f[1].empty() + f[2].empty() + f[3].empty() == 3) {
      for (auto &p : a) p.div();
      continue;
    }
    if (f[0].empty() + f[3].empty() == 2 || f[1].empty() + f[2].empty() == 2) {
      if (f[0].empty() + f[3].empty() != 2) {
        cout << f[0].size() << endl;
        for (auto &p : f[0]) cout << p.num << ' ';
      } else {
        cout << f[1].size() << endl;
        for (auto &p : f[1]) cout << p.num << ' ';
      }
      cout << endl;
    } else {
      cout << f[0].size() + f[3].size() << endl;
      for (auto &p : f[0]) cout << p.num << ' ';
      for (auto &p : f[3]) cout << p.num << ' ';
      cout << endl;
    }
    break;
  }
}
