#include <bits/stdc++.h>
using namespace std;
int a[233333], n;
void wyxakioi() {
  cin >> n;
  int pos = -1;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] != a[1] && pos == -1) pos = i;
  }
  if (pos == -1) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  for (int i = 2; i <= n; i++) {
    if (a[1] != a[i])
      cout << 1 << " " << i << endl;
    else
      cout << pos << " " << i << endl;
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) wyxakioi();
}
