#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    vector<tuple<int, int, int> > num;
    int n;
    cin >> n;
    for (int i = 0, tmp1, tmp2; i < n + n - 1; i++) {
      cin >> tmp1 >> tmp2;
      num.push_back(make_tuple(tmp1, tmp2, i + 1));
    }
    sort(num.begin(), num.end());
    puts("YES");
    for (int i = 0; i < n + n - 2; i += 2) {
      if (get<1>(num[i]) > get<1>(num[i + 1]))
        cout << get<2>(num[i]) << endl;
      else
        cout << get<2>(num[i + 1]) << endl;
    }
    cout << get<2>(num[2 * n - 2]) << endl;
  }
  return 0;
}
