#include <bits/stdc++.h>
using namespace std;
template <typename _T>
inline void _DBG(const char *s, _T x) {
  cerr << s << " = " << x << "\n";
}
template <typename _T, typename... args>
void _DBG(const char *s, _T x, args... a) {
  while (*s != ',') cerr << *s++;
  cerr << " = " << x << ',';
  _DBG(s + 1, a...);
}
void test_case() {
  int n;
  cin >> n;
  vector<pair<int, int>> A(n);
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    A[i] = {a, i};
  }
  sort(A.begin(), A.end());
  if (A[0].first == A[n - 1].first) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  vector<bool> connected(n);
  for (int i = 0; i < n; i++) {
    if (!connected[A[i].second]) {
      for (int j = 0; j < n; j++) {
        if (A[i].first != A[j].first) {
          if (i != 0) {
            if (connected[A[j].second]) {
              cout << (A[i].second + 1) << " " << (A[j].second + 1) << "\n";
              connected[A[i].second] = true;
              break;
            }
          } else {
            cout << (A[i].second + 1) << " " << (A[j].second + 1) << "\n";
            connected[A[j].second] = true;
            connected[A[i].second] = true;
            break;
          }
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    test_case();
  }
  return 0;
}
