#include <bits/stdc++.h>
using namespace std;
long long a[10005];
long long n;
map<long long, long long> mp;
vector<pair<long long, long long> > vv;
vector<long long> v;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    cin >> n;
    mp.clear();
    vv.clear();
    v.clear();
    for (long long i = 1; i <= n; i++) {
      cin >> a[i];
      mp[a[i]]++;
    }
    if (mp[a[1]] == n) {
      cout << "NO" << endl;
    } else {
      v.push_back(1);
      for (long long i = 2; i <= n; i++) {
        if (a[i] == a[1]) {
          v.push_back(i);
        }
      }
      mp.clear();
      long long x = v[0];
      for (long long j = 1; j <= n; j++) {
        if (a[x] != a[j]) {
          vv.push_back({x, j});
        }
      }
      for (long long i = 1; i < v.size(); i++) {
        long long x = v[i];
        for (long long j = 1; j <= n; j++) {
          if (a[x] != a[j]) {
            vv.push_back({x, j});
            break;
          }
        }
      }
      cout << "YES" << endl;
      for (long long i = 0; i < vv.size(); i++) {
        cout << vv[i].first << " " << vv[i].second << endl;
      }
    }
  }
  return 0;
}
