#include <bits/stdc++.h>
using namespace std;
void c_h_g() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  c_h_g();
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> a(n);
    for (long long i = 0; i < n; i++) cin >> a[i];
    long long count = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] == a[0]) count++;
    }
    if (count == n)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      vector<long long> v;
      long long z = 0;
      for (long long i = 1; i < n; i++) {
        if (a[i] != a[0]) {
          cout << 1 << " " << i + 1 << endl;
          z = i + 1;
        } else
          v.push_back(i);
      }
      for (auto j : v) {
        cout << z << " " << j + 1 << endl;
      }
    }
  }
  return 0;
}
