#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
long long int powmod(long long int a, long long int b, long long int c) {
  long long int res = 1;
  a %= c;
  if (a == 0) return 0;
  while (b > 0) {
    if (b & 1) res = (res * a) % c;
    b = b >> 1;
    a = (a * a) % c;
  }
  return res;
}
long long int mulMod(long long int a, long long int b) { return (a * b) % mod; }
long long int addMod(long long int a, long long int b) { return (a + b) % mod; }
void swap(long long int &x, long long int &y) {
  x = x + y;
  y = x - y;
  x = x - y;
}
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> v(n);
  for (long long int i = 0; i < n; ++i) cin >> v[i];
  auto it1 = max_element(v.begin(), v.end());
  auto it2 = min_element(v.begin(), v.end());
  if (*it1 == *it2)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    long long int p1 = it1 - v.begin();
    long long int p2 = it2 - v.begin();
    for (long long int i = 0; i < n; ++i) {
      if (i != p1) {
        cout << i + 1 << " ";
        if (v[i] == v[p1])
          cout << p2 + 1 << endl;
        else
          cout << p1 + 1 << endl;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int t;
  cin >> t;
  for (; t--;) solve();
  return 0;
}
