#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t, n, a;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<pair<int, int>> pp(n);
    for (int i = 0; i < n; i++) {
      cin >> a;
      pp[i].first = a;
      pp[i].second = i;
    }
    sort(pp.begin(), pp.end());
    if (pp[0].first == pp[n - 1].first) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    for (int i = n - 1; i > 0; i--) {
      if (pp[i].first != pp[0].first) {
        cout << pp[0].second + 1 << " " << pp[i].second + 1 << "\n";
      } else {
        cout << pp[n - 1].second + 1 << " " << pp[i].second + 1 << "\n";
      }
    }
  }
  return 0;
}
