#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
  int n, x;
  cin >> n;
  int ar[n];
  map<int, int> f;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    f[ar[i]]++;
    if (ar[i] != ar[0]) {
      x = i;
    }
  }
  if (f.size() == 1) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  for (int i = 1; i < n; i++) {
    if (ar[i] != ar[0]) {
      cout << 1 << ' ' << i + 1 << '\n';
    } else {
      cout << x + 1 << ' ' << i + 1 << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
