#include <bits/stdc++.h>
using namespace std;
struct Node {
  int x, y, id;
  Node() : x(0), y(0) {}
  bool operator<(const Node &rhs) const {
    return x < rhs.x || x == rhs.x && y < rhs.y;
  }
};
int main() {
  int cases, n;
  for (scanf("%d", &cases); cases--;) {
    scanf("%d", &n);
    vector<Node> a(n * 2);
    for (int i = 0; i < n * 2 - 1; i++) {
      scanf("%d%d", &a[i].x, &a[i].y);
      a[i].id = i;
    }
    sort(a.begin(), a.begin() + n * 2 - 1);
    puts("YES");
    for (int i = 0; i < n * 2 - 1; i += 2)
      printf("%d ", a[a[i].y < a[i + 1].y ? i + 1 : i].id + 1);
    puts("");
  }
}
