#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
const int MAX = 5e3 + 10;
const int MOD = 1e9 + 7;
using namespace std;
int a[MAX];
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    int l = 0;
    for (int i = 2; i <= n; i++)
      if (a[i] != a[1]) {
        l = i;
        break;
      }
    if (!l) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    cout << 1 << " " << l << endl;
    for (int i = 2; i <= n; i++) {
      if (i == l) continue;
      if (a[i] == a[1])
        cout << l << " " << i << endl;
      else
        cout << 1 << " " << i << endl;
    }
  }
  return 0;
}
