#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    set<long long int> s;
    vector<pair<long long int, long long int> > a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i].first;
      a[i].second = i + 1;
      s.insert(a[i].first);
    }
    sort((a).begin(), (a).end());
    if (s.size() == 1) {
      cout << "NO" << endl;
      continue;
    }
    vector<long long int> marker(n, 0);
    cout << "YES" << endl;
    long long int ind = -1;
    for (long long int i = 1; i < n; i++) {
      if (a[i].first == a[0].first) {
        ind = i;
      } else {
        cout << a[0].second << " " << a[i].second << endl;
      }
    }
    for (long long int i = 1; i <= ind; i++) {
      cout << a[ind + 1].second << " " << a[i].second << endl;
    }
  }
}
