#include <bits/stdc++.h>
int aa[100000 * 2 - 1], bb[100000 * 2 - 1];
int compare(const void *a, const void *b) {
  int i = *(int *)a;
  int j = *(int *)b;
  return aa[i] != aa[j] ? aa[i] - aa[j] : bb[i] - bb[j];
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    static int ii[100000 * 2 - 1];
    int n, i, cnt;
    scanf("%d", &n);
    for (i = 0; i < n * 2 - 1; i++) {
      scanf("%d%d", &aa[i], &bb[i]);
      ii[i] = i;
    }
    qsort(ii, n * 2 - 1, sizeof *ii, compare);
    printf("YES\n");
    cnt = 0;
    for (i = 0; i < n * 2 - 1; i++)
      if (cnt && bb[ii[cnt - 1]] <= bb[ii[i]]) {
        printf("%d ", ii[i] + 1);
        cnt--;
      } else
        ii[cnt++] = ii[i];
    for (i = 0; i < cnt; i += 2) printf("%d ", ii[i] + 1);
    printf("\n");
  }
  return 0;
}
