#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, i, j, pos, pos2, flag = 0;
    cin >> n;
    long long int a[n];
    for (i = 0; i < n; i++) cin >> a[i];
    for (i = 1; i < n; i++) {
      if (a[i] != a[i - 1]) {
        flag = 1;
      }
    }
    long long int ans;
    if (flag == 0)
      cout << "NO" << endl;
    else {
      map<long long int, vector<long long int>> mp;
      vector<pair<long long int, long long int>> ans;
      for (i = 0; i < n; i++) {
        mp[a[i]].push_back(i + 1);
      }
      long long int k = mp.begin()->second[0];
      for (auto i = mp.begin(); i != mp.end(); i++) {
        if (i == mp.begin()) continue;
        for (auto j : i->second) {
          ans.push_back({k, j});
        }
      }
      for (i = 1; i < mp.begin()->second.size(); i++) {
        ans.push_back({ans[0].second, mp.begin()->second[i]});
      }
      cout << "YES" << endl;
      for (i = 0; i < ans.size(); i++) {
        cout << min(ans[i].first, ans[i].second) << " "
             << max(ans[i].first, ans[i].second) << endl;
      }
    }
  }
  return 0;
}
