#include <bits/stdc++.h>
using namespace std;
const int32_t INFint = 1e9;
const long long INFll = 1e18;
const long long INF = 9e18;
const long double PI = acos(-1);
long long powersOfTwo[31] = {
    1,         2,         4,         8,        16,       32,       64,
    128,       256,       512,       1024,     2048,     4096,     8192,
    16384,     32768,     65536,     131072,   262144,   524288,   1048576,
    2097152,   4194304,   8388608,   16777216, 33554432, 67108864, 134217728,
    268435456, 536870912, 1073741824};
long long power(long long x, long long y) {
  long long r = 1;
  while (y > 0) {
    if (y & 1) r = r * x;
    y = y >> 1;
    x = x * x;
  }
  return r;
}
long long powerMod(long long x, long long y, long long p) {
  long long res = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long log2n(long long n) { return (n > 1) ? 1 + log2n(n / 2) : 0; }
long long twoPower(long long n) { return (n) ? 2 * twoPower(n - 1) : 1; }
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long tt = 1;
  cin >> tt;
  long long tc = tt;
  while (tt--) {
    long long n;
    cin >> n;
    vector<long long> arr(n);
    for (long long i = 0; i < n; i++) cin >> arr[i];
    ;
    long long f, s, fi, si;
    f = arr[0];
    fi = 0;
    s = f, si = fi;
    for (long long i = 0; i < n; i++) {
      if (arr[i] != f) {
        s = arr[i];
        si = i;
        break;
      }
    }
    if (s == f) {
      cout << "NO" << '\n';
      continue;
    }
    cout << "YES" << '\n';
    for (long long i = 1; i < n; i++) {
      if (arr[i] != f) {
        cout << fi + 1 << " " << i + 1 << '\n';
      } else {
        cout << si + 1 << " " << i + 1 << '\n';
      }
    }
  }
  cerr << "Time : " << 1000 * (long double)clock() / (long double)CLOCKS_PER_SEC
       << "ms\n";
  ;
}
