#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 10;
struct node {
  int x;
  int y;
  int index;
} a[N];
bool cmp(node t1, node t2) {
  if (t1.x < t2.x) return true;
  return false;
}
int main() {
  int T, i, j, n;
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    for (i = 1; i <= n + n - 1; i++) {
      scanf("%d%d", &a[i].x, &a[i].y);
      a[i].index = i;
    }
    sort(a + 1, a + 1 + n + n - 1, cmp);
    printf("YES\n");
    for (i = 2; i < n + n - 1; i = i + 2) {
      if (a[i].y > a[i - 1].y)
        printf("%d ", a[i].index);
      else
        printf("%d ", a[i - 1].index);
    }
    printf("%d\n", a[n + n - 1].index);
  }
  return 0;
}
