#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long pp = 0;
    pp++;
    pp--;
    vector<long long> a(n);
    pp++;
    pp--;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    pp++;
    pp--;
    long long ind = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] != a[0]) {
        ind = 1;
      }
    }
    pp++;
    pp--;
    if (!ind) {
      cout << "NO\n";
      continue;
    }
    pp++;
    pp--;
    cout << "YES\n";
    long long pos;
    for (long long i = 1; i < n; i++) {
      if (a[i] != a[0]) pos = i, cout << 1 << " " << i + 1 << endl;
    }
    pp++;
    pp--;
    for (long long i = 1; i < n; i++) {
      if (a[i] == a[0]) {
        cout << pos + 1 << " " << i + 1 << endl;
      }
    }
  }
}
