#include <bits/stdc++.h>
using namespace std;
const int MN = 1e6 + 100;
int ora[MN];
int ap[MN];
pair<int, int> p[MN];
int main() {
  ios::sync_with_stdio(0);
  int t;
  cin >> t;
  for (int tes = 0; tes < t; tes++) {
    int n;
    cin >> n;
    for (int i = 0; i < 2 * n - 1; i++) {
      cin >> ap[i] >> ora[i];
      p[i] = make_pair(ap[i], i);
    }
    cout << "YES\n";
    sort(p, p + 2 * n - 1);
    for (int i = 0; i < n - 1; i++) {
      if (ora[p[2 * i].second] >= ora[p[2 * i + 1].second]) {
        cout << p[2 * i].second + 1 << " ";
      } else {
        cout << p[2 * i + 1].second + 1 << " ";
      }
    }
    cout << p[2 * n - 2].second + 1 << endl;
  }
}
