#include <bits/stdc++.h>
using namespace std;
void split(const std::vector<std::pair<long long, long long>>& points,
           std::vector<int>& first, std::vector<int>& second,
           std::vector<int>& third, std::vector<int>& fourth) {
  int n = points.size();
  for (int i = 0; i < n; ++i)
    if (points[i].first % 2 == 0)
      if (points[i].second % 2 == 0)
        first.push_back(i);
      else
        second.push_back(i);
    else if (points[i].second % 2 == 0)
      third.push_back(i);
    else
      fourth.push_back(i);
}
int main() {
  long long n;
  std::cin >> n;
  std::vector<std::pair<long long, long long>> points(n);
  std::vector<std::vector<int>> groups(4);
  for (int i = 0; i < n; ++i) std::cin >> points[i].first >> points[i].second;
  split(points, groups[0], groups[1], groups[2], groups[3]);
  while (groups[0].size() == n || groups[1].size() == n ||
         groups[2].size() == n || groups[3].size() == n) {
    for (int i = 0; i < n; ++i) points[i].first >>= 1, points[i].second >>= 1;
    for (int i = 0; i < 4; ++i) groups[i].clear();
    split(points, groups[0], groups[1], groups[2], groups[3]);
  }
  int even_sum = groups[0].size() + groups[3].size();
  if (even_sum > 0 && even_sum < n) {
    std::cout << even_sum << '\n';
    for (int i : groups[0]) std::cout << i + 1 << ' ';
    for (int i : groups[3]) std::cout << i + 1 << ' ';
  } else if (even_sum == n) {
    std::cout << groups[0].size() << '\n';
    for (int i : groups[0]) std::cout << i + 1 << ' ';
  } else {
    std::cout << groups[1].size() << '\n';
    for (int i : groups[1]) std::cout << i + 1 << ' ';
  }
}
