#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int $ = 1;
  cin >> $;
  while ($--) {
    ll n, m = 0;
    cin >> n;
    ll a[n];
    bool vis[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 1; i < n; i++) {
      if (a[i] != a[0]) m = 1;
      vis[i] = false;
    }
    if (!m)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      for (int i = 0; i < n - 1; i++) {
        for (int j = i + 1; j < n; j++) {
          if ((!vis[i] || !vis[j]) && a[i] != a[j]) {
            cout << i + 1 << " " << j + 1 << endl;
            vis[i] = vis[j] = true;
          }
        }
      }
    }
  }
}
