#include <bits/stdc++.h>
using namespace std;
struct node {
  int a, b, id;
} f[222222];
bool cmp(node x, node y) {
  if (x.a == y.a) return x.b < y.b;
  return x.a < y.a;
}
int main() {
  int t;
  scanf("%d", &t);
  int n;
  while (t--) {
    scanf("%d", &n);
    for (int i = 1; i <= n * 2 - 1; i++) {
      scanf("%d%d", &f[i].a, &f[i].b);
      f[i].id = i;
    }
    int j = 0;
    int ans[111115];
    sort(f + 1, f + n * 2, cmp);
    for (int i = 1; i < n * 2 - 1; i += 2) {
      if (f[i].b >= f[i + 1].b)
        ans[j++] = f[i].id;
      else
        ans[j++] = f[i + 1].id;
    }
    ans[j++] = f[2 * n - 1].id;
    cout << "YES" << endl;
    sort(ans, ans + j);
    for (int i = 0; i < j; i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
