#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long t = 1, n;
  string s;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<long long> v(n);
    map<long long, long long> mp;
    for (int i = 0; i < n; ++i) {
      cin >> v[i];
      mp[v[i]]++;
    }
    if (mp.size() == 1)
      cout << "NO\n";
    else {
      vector<pair<long long, long long> > res;
      long long f = 0;
      long long ans = -1;
      for (int i = 1; i < n; ++i) {
        if (v[0] != v[i]) {
          if (!f) {
            ans = i;
            f = 1;
          }
          res.push_back({0, i});
        }
      }
      for (int i = 1; i < n; ++i) {
        if (v[i] == v[0]) {
          res.push_back({i, ans});
        }
      }
      cout << "YES\n";
      for (auto i : res) cout << i.first + 1 << ' ' << i.second + 1 << '\n';
    }
  }
}
