#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    vector<int> a(n);
    for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
    queue<int> q;
    vector<int> v(n, 0);
    vector<pair<int, int> > ans;
    q.push(0);
    v[0] = 1;
    while (q.size()) {
      int x = q.front();
      q.pop();
      for (int y = 0; y < n; ++y) {
        if (a[x] != a[y] && !v[y]) {
          ans.push_back(pair<int, int>(x + 1, y + 1));
          q.push(y);
          v[y] = 1;
        }
      }
    }
    if (ans.size() == n - 1) {
      puts("YES");
      for (pair<int, int> e : ans) printf("%d %d\n", e.first, e.second);
    } else
      puts("NO");
  }
}
