#include <bits/stdc++.h>
using namespace std;
int main() {
  long long T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    long long a[n];
    map<long long, long long> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      m[a[i]]++;
    }
    map<long long, long long>::iterator it;
    string ans = "YES";
    long long mn = n;
    for (it = m.begin(); it != m.end(); it++) {
      if ((*it).second > n - 1) ans = "NO";
    }
    cout << ans << "\n";
    if (ans == "YES") {
      for (int i = 1; i < n; i++) {
        if (a[i] != a[0]) cout << 1 << " " << i + 1 << "\n";
      }
      long long p = 0;
      for (int i = 0; i < n; i++) {
        if (a[i] != a[0]) {
          p = i + 1;
          i = n;
        }
      }
      for (int i = 1; i < n; i++) {
        if (a[i] == a[0]) cout << p << " " << i + 1 << "\n";
      }
    }
  }
}
