#include <bits/stdc++.h>
using namespace std;
int main() {
  cout << fixed;
  cout.precision(9);
  int t;
  cin >> t;
  while (t-- > 0) {
    int n;
    cin >> n;
    list<pair<pair<long, long>, int> > a;
    vector<pair<pair<long, long>, int> > b;
    vector<int> res;
    for (int i = 0; i < 2 * n - 1; i++) {
      long x, y;
      cin >> x >> y;
      b.push_back(make_pair(make_pair(x, y), i + 1));
    }
    sort(b.begin(), b.end());
    for (int i = 0; i < b.size(); i++) a.push_back(b[i]);
    list<pair<pair<long, long>, int> >::iterator i = a.begin(), j = a.begin(),
                                                 tmp;
    ++j;
    while (res.size() < n) {
      while (j != a.end() && i->first.second > j->first.second) {
        ++i;
        ++j;
      }
      if (j == a.end()) {
        j = a.begin();
        for (;;) {
          res.push_back(j->second);
          if (j == i) break;
          ++j;
          ++j;
        }
      } else {
        res.push_back(j->second);
        if (i == a.begin()) {
          a.pop_front();
          a.pop_front();
          i = a.begin();
          j = i;
          ++j;
        } else {
          tmp = j;
          ++tmp;
          a.erase(j);
          j = tmp;
          tmp = i;
          --tmp;
          a.erase(i);
          i = tmp;
        }
      }
    }
    cout << "YES\n";
    for (int i = 0; i < n; i++) cout << res[i] << " ";
    cout << "\n";
  }
  return 0;
}
