#include <bits/stdc++.h>
using namespace std;
void solve() {
  unsigned long long int t;
  cin >> t;
  while (t--) {
    unsigned long long int n;
    cin >> n;
    unsigned long long int x;
    cin >> x;
    vector<unsigned long long int> ind;
    vector<pair<unsigned long long int, unsigned long long int>> store;
    unsigned long long int count = 0, ind1;
    for (unsigned long long int i = 1; i <= n - 1; i++) {
      unsigned long long int y;
      cin >> y;
      if (y != x) {
        ind1 = i + 1;
        count++;
        store.push_back({1, i + 1});
      } else {
        ind.push_back(i);
      }
    }
    if (count == 0)
      cout << "NO"
           << "\n";
    else {
      cout << "YES"
           << "\n";
      for (auto pr : store) {
        cout << pr.first << " " << pr.second << "\n";
      }
      if (ind.size() != 0) {
        for (auto x : ind) {
          cout << ind1 << " " << x + 1 << "\n";
        }
      }
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
