#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1000000005ll * 1000000005ll;
const int INF = 1000000005;
const int N = 5005;
void solve() {
  int n, ind;
  pair<int, int> a[N];
  bool done = false;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  if (a[0].first == a[n - 1].first) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES" << endl;
  for (int i = 1; i < n; i++) {
    if (a[i].first != a[i - 1].first && !done) {
      done = true;
      ind = i;
    }
    if (done) {
      cout << a[i].second + 1 << " " << a[0].second + 1 << endl;
    }
  }
  for (int i = 1; i < ind; i++) {
    cout << a[i].second + 1 << " " << a[ind].second + 1 << endl;
  }
}
void precalc() { return; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  precalc();
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
