#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int value, d;
    int sum, size = 0;
    vector<int> a, b;
    cin >> d;
    a.push_back(1);
    for (int i = 2; i <= n; i++) {
      cin >> value;
      if (value == d)
        a.push_back(i);
      else
        b.push_back(i);
    }
    if (a.size() == n) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    int i;
    for (i = 0; i < b.size(); i++) {
      cout << 1 << " " << b[i] << endl;
      size++;
    }
    if (size < n - 1) {
      int z = b[0];
      for (int j = 1; j < a.size(); j++) {
        cout << z << " " << a[j] << endl;
      }
    }
  }
  return 0;
}
