#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    int a[5050];
    cin >> n;
    int id = -1;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      if (id < 0 && a[i] != a[1]) id = i;
    }
    if (id < 0) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    for (int i = 2; i <= n; i++) {
      if (a[i] != a[1])
        cout << 1 << " " << i << endl;
      else
        cout << id << " " << i << endl;
    }
  }
  return 0;
}
