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