#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    int a[n + 1], cnt = 0;
    for (int i = 1; i <= n; ++i) {
      cin >> a[i];
    }
    vector<pair<int, int> > res;
    int sec = -1;
    for (int i = 2; i <= n; ++i) {
      if (a[i] != a[1]) {
        if (sec == -1) sec = i;
        res.push_back({1, i});
      }
    }
    if (sec == -1) {
      cout << "NO" << endl;
      continue;
    }
    for (int i = 2; i <= n; ++i) {
      if (a[i] == a[1]) res.push_back({sec, i});
    }
    cout << "YES" << endl;
    for (auto i : res) cout << i.first << ' ' << i.second << endl;
  }
  return 0;
}
