#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2 * 1000 * 100 + 1000;
pair<pair<long long, long long>, int> p[MAXN];
int t, n;
void input() {
  scanf("%d", &n);
  n = (n * 2) - 1;
  for (int i = 1; i <= n; i++) {
    long long x, y;
    scanf("%d%d", &x, &y);
    p[i] = make_pair(make_pair(x, y), i);
  }
}
int answer(int k) {
  if ((k == n) || p[k].first.second > p[k + 1].first.second) return p[k].second;
  return p[k + 1].second;
}
void output() {
  printf("YES\n");
  for (int i = 1; i <= n; i += 2) {
    printf("%d ", answer(i));
  }
}
void main2() {
  input();
  sort(p + 1, p + n + 1);
  output();
}
int main() {
  scanf("%d", &t);
  for (int i = 1; i <= t; i++) {
    main2();
    printf("\n");
  }
}
