#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int test;
  cin >> test;
  while (test--) {
    int n;
    cin >> n;
    int a[n];
    set<int> hash;
    vector<pair<int, int>> v;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      v.push_back({a[i], i + 1});
      hash.insert(a[i]);
    }
    int ans;
    if (hash.size() == 1) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      sort(v.begin(), v.end());
      int id = 0;
      while (v[id].first == v[0].first) id++;
      for (int i = id; i < n; i++) {
        cout << v[0].second << " " << v[i].second << endl;
      }
      for (int i = 1; i < id; i++) {
        cout << v[id].second << " " << v[i].second << endl;
      }
    }
  }
  return 0;
}
