#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    set<pair<pair<int, int>, int> > S;
    for (int i = (int)(0); i < (int)(2 * n - 1); ++i) {
      int a, o;
      scanf("%d%d", &a, &o);
      S.insert(make_pair(make_pair(a, o), i + 1));
    }
    vector<int> output;
    for (__typeof(S.begin()) it(S.begin()); it != (S.end()); ++it) {
      if (it != (--(S.end()))) {
        set<pair<pair<int, int>, int> >::iterator it2 = it, it3 = it;
        it2++;
        if ((it2->first).second > (it->first).second) {
          output.push_back(it2->second);
          bool f = 1;
          if (it == S.begin())
            f = 0;
          else
            it--;
          S.erase(it2);
          S.erase(it3);
          if (!f) it = S.begin();
        }
      }
    }
    int cnt = 0;
    for (__typeof(S.begin()) it(S.begin()); it != (S.end()); ++it) {
      if (cnt % 2 == 0) output.push_back(it->second);
      cnt++;
    }
    cout << "YES\n";
    sort(output.begin(), output.end());
    for (int i = (int)(0); i < (int)(output.size()); ++i)
      cout << output[i] << " ";
    cout << endl;
  }
  return 0;
}
