#ifdef LOCAL //#define _GLIBCXX_DEBUG #endif //#pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include using namespace std; typedef long long ll; typedef pair P; typedef pair Pi; typedef vector Vec; typedef vector Vi; typedef vector Vs; typedef vector Vc; typedef vector

VP; typedef vector> VV; typedef vector> VVi; typedef vector> VVc; typedef vector>> VVV; typedef vector>>> VVVV; #define REP(i, a, b) for(ll i=(a); i<(b); i++) #define PER(i, a, b) for(ll i=(a); i>=(b); i--) #define rep(i, n) REP(i, 0, n) #define per(i, n) PER(i, n, 0) const ll INF=1e18+18; const ll MOD=1000000007; #define Yes(n) cout << ((n) ? "Yes" : "No") << endl; #define YES(n) cout << ((n) ? "YES" : "NO") << endl; #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define pb(x) push_back(x) #define mp(a, b) make_pair(a,b) #define Each(a,b) for(auto &a :b) #define rEach(i, mp) for (auto i = mp.rbegin(); i != mp.rend(); ++i) #ifdef LOCAL #define dbg(x_) cerr << #x_ << ":" << x_ << endl; #define dbgmap(mp) cerr << #mp << ":"<first <<":"<second << endl;} #define dbgset(st) cerr << #st << ":"<bool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b ostream &operator<<(ostream &s, const pair &p) { return s<<"("<istream& operator>>(istream&i,vector&v) {rep(j,v.size())i>>v[j];return i;} // vector template ostream &operator<<(ostream &s, const vector &v) { int len=v.size(); for(int i=0; i ostream &operator<<(ostream &s, const vector > &vv) { int len=vv.size(); for(int i=0; i>n; Vec x(n); Vec y(n); Vec div(n); Vec zone(n); ll distinct = 9; auto getdiv = [&](ll x, ll y)->ll{ ll res = 0; ll dx = x/distinct; ll dy = y/distinct; if(dx%2!=0)res+=2; if(dy%2!=0)res+=1; return res; }; auto getzone = [&](ll x, ll y)->ll{ ll dx = x/distinct; ll dy = y/distinct; return dx*100+dy; }; vector> divcnt(4); rep(i,n){ cin>>x[i]>>y[i]; x[i]--; y[i]--; div[i] = getdiv(x[i],y[i]); zone[i] = getzone(x[i],y[i]); divcnt[div[i]][zone[i]]++; } dbg(div) dbg(zone) Vec ans; ll z = -1; ll tmp = -1; rep(i,4){ if(chmax(tmp, (ll) divcnt[i].size())){ z = i; } } //zのzoneを採用する。 Vec selected(10000); rep(i,n){ if(div[i]!=z)continue; if(selected[zone[i]])continue; ans.pb(i); selected[zone[i]] = 1; } rep(i,ans.size()){ ans[i]++; } out(ans.size()); vout(ans); return 0; } int main() { cin.tie(0); ios::sync_with_stdio(false); cout<