#include <bits/stdc++.h>
using namespace std;
const int maxN = 200 * 1000 + 1000;
int n;
pair<pair<int, int>, int> a[maxN];
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t-- > 0) {
    cin >> n;
    for (int i = 0; i < 2 * n - 1; i++)
      cin >> a[i].first.first >> a[i].first.second, a[i].second = i + 1;
    sort(a, a + 2 * n - 1);
    cout << "YES" << endl;
    for (int i = 0; i < n - 1; i++)
      if (a[2 * i].first.second > a[2 * i + 1].first.second)
        cout << a[2 * i].second << ' ';
      else
        cout << a[2 * i + 1].second << ' ';
    cout << a[2 * n - 2].second << endl;
  }
  return 0;
}
