#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, e, temp;
  cin >> t;
  vector<int> v;
  int arr[5000];
  while (t--) {
    v.clear();
    cin >> n;
    cin >> e;
    v.push_back(0);
    arr[0] = e;
    for (int i = 1; i < n; i++) {
      cin >> arr[i];
      if (arr[i] == e) v.push_back(i);
    }
    if (v.size() == n) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      if (arr[i] != e) {
        temp = i + 1;
        cout << 1 << " " << i + 1 << endl;
      }
    }
    for (int i = 1; i < v.size(); i++) {
      cout << temp << " " << v[i] + 1 << endl;
    }
  }
  return 0;
}
