#include <bits/stdc++.h>
using namespace std;
const long long N = 5000;
long long t, n, a[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> n;
    for (long long i = 0; i < n; i++) cin >> a[i];
    if (all_of(a, a + n, [](long long i) { return i == a[0]; }))
      cout << "NO\n";
    else {
      vector<long long> f;
      long long s = -1;
      cout << "YES\n";
      for (long long i = 1; i < n; i++)
        if (a[i] == a[0])
          f.push_back(i);
        else
          cout << "1 " << i + 1 << '\n', s = i;
      for (long long i : f) cout << s + 1 << ' ' << i + 1 << '\n';
    }
  }
}
