#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    unordered_map<int, int> mp;
    vector<int> v(n);
    for (auto &e : v) {
      cin >> e;
      mp[e]++;
    }
    if (mp.size() == 1) {
      cout << "NO\n";
      continue;
    }
    int mn = n, pos;
    for (auto it : mp) {
      if (it.second < mn) {
        mn = it.second;
        pos = it.first;
      }
    }
    vector<int> ar;
    for (int i = 0; i < v.size(); i++) {
      if (v[i] == pos) {
        ar.push_back(i);
      }
    }
    cout << "YES\n";
    int a = ar[0];
    for (int i = 0; i < v.size(); i++) {
      if (v[i] != v[a]) {
        cout << a + 1 << " " << i + 1 << endl;
      }
    }
    int j = 1;
    for (int i = 0; i < v.size(); i++) {
      if (j >= ar.size()) break;
      if (v[i] != v[ar[j]]) {
        cout << ar[j] + 1 << " " << i + 1 << endl;
        j++;
      }
    }
  }
  return 0;
}
