#include <bits/stdc++.h>
using namespace std;
int ai[200050];
struct node {
  int x, y, ip;
} nod[200050];
bool cmp(node a, node b) {
  if (a.x != b.x)
    return a.x < b.x;
  else
    return a.y < b.y;
}
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 1; i <= 2 * n - 1; i++) {
      cin >> nod[i].x >> nod[i].y;
      nod[i].ip = i;
    }
    sort(nod + 1, nod + 2 * n, cmp);
    int k = -1;
    for (int i = 1; i < 2 * n - 1; i += 2) {
      if (nod[i].y > nod[i + 1].y)
        ai[++k] = nod[i].ip;
      else
        ai[++k] = nod[i + 1].ip;
    }
    ai[++k] = nod[2 * n - 1].ip;
    puts("YES");
    sort(ai, ai + k + 1);
    for (int i = 0; i <= k; i++) {
      if (i != k)
        cout << ai[i] << " ";
      else {
        cout << ai[i] << endl;
      }
    }
  }
  return 0;
}
