#include #include using namespace std; using namespace atcoder; typedef modint998244353 mint; typedef long long ll; int main(){ int n; cin >> n; vector> p; for (int i=0; i> x >> y; p.push_back(tuple(x,y,i)); } sort(p.begin(), p.end()); cout << n/2 << endl; for (int i=0; i(p[2*i]) + 1 << " " << get<2>(p[2*i+1]) + 1 << endl; } }