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