#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    int i;
    for (i = 0; i < n; i++) cin >> a[i];
    int maxi = a[0];
    int ans = -1;
    for (i = 1; i < n; i++) {
      if (a[i] != maxi) break;
    }
    if (i == n) {
      cout << "NO\n";
      continue;
    }
    vector<int> v;
    for (i = 1; i < n; i++) {
      if (a[i] != a[0]) {
        v.push_back(i + 1);
      }
    }
    vector<int> v1;
    for (i = 1; i < n; i++) {
      if (a[i] == a[0]) v1.push_back(i + 1);
    }
    cout << "YES\n";
    for (i = 0; i < v.size(); i++) cout << "1 " << v[i] << "\n";
    for (i = 0; i < v1.size(); i++) cout << v[0] << " " << v1[i] << "\n";
  }
  return 0;
}
