#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
int add(int a, int b) {
  if ((a += b) >= P) a -= P;
  return a < 0 ? a + P : a;
}
int mul(int a, int b) { return 1ll * a * b % P; }
int kpow(int a, int b) {
  int r = 1;
  for (; b; b >>= 1, a = mul(a, a)) {
    if (b & 1) r = mul(r, a);
  }
  return r;
}
const int N = 1e6 + 7;
int n, T;
pair<pair<int, int>, int> a[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> T;
  for (int cas = (0); cas < (T); cas++) {
    cin >> n;
    for (int i = (1); i < (n * 2); i++)
      cin >> a[i].first.first >> a[i].first.second, a[i].second = i;
    sort(a + 1, a + n * 2);
    vector<int> ans;
    ans.push_back(n * 2 - 1);
    for (int i = n * 2 - 2; i >= 1; i -= 2) {
      if (a[i].first.second > a[i - 1].first.second)
        ans.push_back(i);
      else
        ans.push_back(i - 1);
    }
    cout << "YES"
         << "\n";
    for (int i = (0); i < (n); i++)
      cout << a[ans[i]].second << " \n"[i == n - 1];
  }
  return 0;
}
