#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long nodig(long long a) {
  long long r = 0;
  while (a > 0) {
    r++;
    a /= 10;
  }
  return r;
}
int prime(int a) {
  int i = 2, flag = 0;
  for (i = 2; i * i <= a; i++) {
    if (a % i == 0) {
      flag = 1;
      break;
    }
  }
  return flag;
}
long long po(long long a, long long b) {
  long long c = 0;
  while (a > 2 * b) {
    b *= 2;
    c++;
  }
  return c;
}
long long cub(long long a) {
  long long b = cbrt(a);
  if (b * b * b == a)
    return 0;
  else
    return 1;
}
int main() {
  long long t;
  t = 1;
  cin >> t;
  while (t--) {
    long long n, x, z = 0, m, l, f, i;
    cin >> n;
    long long a[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (i = 1; i < n; i++) {
      if (a[i] != a[i - 1]) {
        z = 1;
        break;
      }
    }
    if (z == 0)
      cout << "NO\n";
    else {
      cout << "YES\n";
      m = a[0];
      for (i = 0; i < n; i++) {
        if (a[i] != m) {
          cout << 1 << " " << (i + 1) << "\n";
          l = i + 1;
        }
      }
      for (i = 1; i < n; i++) {
        if (a[i] == m) {
          cout << l << " " << (i + 1) << "\n";
        }
      }
    }
  }
  return 0;
}
