#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tc;
  cin >> tc;
  while (tc--) {
    long long n;
    cin >> n;
    long long pin[n];
    set<long long> setkalo;
    map<long long, vector<long long> > enamapkalo;
    for (long long i = 0; i < n; i++) {
      cin >> pin[i];
      enamapkalo[pin[i]].push_back(i + 1);
      setkalo.insert(pin[i]);
    }
    if (setkalo.size() == 1) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    vector<vector<long long> > vee;
    vee.assign(setkalo.size() + 5, vector<long long>());
    long long c = -1;
    for (auto x : enamapkalo) {
      c++;
      for (auto y : x.second) {
        vee[c].push_back(y);
      }
    }
    for (long long i = 0; i < setkalo.size() - 1; i++) {
      for (auto x : vee[i + 1]) cout << vee[i][0] << ' ' << x << endl;
    }
    long long oxiproto = 0;
    for (auto x : vee[0]) {
      if (oxiproto == 0) {
        oxiproto = 1;
        continue;
      }
      cout << x << ' ' << vee[1][0] << endl;
    }
  }
  return 0;
}
