#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int h = 0; h < t; h++) {
    int n;
    cin >> n;
    vector<int> a(n);
    vector<pair<int, int>> t;
    bool fl = true;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (i > 0)
        if (a[i - 1] != a[i]) fl = false;
    }
    if (fl)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      int a1 = a[0];
      vector<int> ost;
      int tmp_ost = -1;
      for (int i = 1; i < n; i++) {
        if (a[i] != a1) {
          t.push_back(make_pair(0, i));
          if (tmp_ost == -1) tmp_ost = i;
        } else {
          ost.push_back(i);
        }
      }
      for (auto it : t) {
        cout << it.first + 1 << " " << it.second + 1 << endl;
      }
      if (!ost.empty()) {
        for (int it : ost) {
          cout << it + 1 << " " << tmp_ost + 1 << endl;
        }
      }
    }
  }
  return 0;
}
