#include <bits/stdc++.h>
using namespace std;
vector<vector<long long>> g;
vector<long long> used;
vector<pair<long long, long long>> ans;
void dfs(long long o) {
  used[o] = 1;
  long long i;
  for (i = 0; i < g.size(); i++)
    if (g[o][i] && !used[i]) {
      ans.push_back(make_pair(o + 1, i + 1));
      dfs(i);
    }
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, i, j, t = 1;
    cin >> n;
    vector<long long> a(n);
    vector<pair<long long, long long>> v;
    ans.clear();
    used = vector<long long>(n);
    g = vector<vector<long long>>(n, vector<long long>(n));
    for (i = 0; i < n; i++) cin >> a[i];
    for (i = 0; i < n; i++)
      for (j = 0; j < n; j++)
        if (a[i] != a[j]) g[i][j] = 1;
    dfs(0);
    for (i = 0; i < n; i++)
      if (!used[i]) t = 0;
    if (!t)
      cout << "NO\n";
    else {
      cout << "YES\n";
      for (i = 0; i < n - 1; i++)
        cout << ans[i].first << ' ' << ans[i].second << '\n';
    }
  }
}
