#include <bits/stdc++.h>
const int mx = 1e6 + 5;
using namespace std;
long long a[300050], m, ans, i, t, k, ev = 0, od = 0, tt = 0, n, cas = 1;
int main() {
  ios::sync_with_stdio(true);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n, on = 0, cnt = 0, mx = 0;
    cin >> n;
    set<long long> s;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      s.insert(a[i]);
    }
    if (s.size() == 1)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      int x;
      for (int i = 2; i <= n; i++) {
        if (a[1] != a[i]) {
          x = i;
          break;
        }
      }
      for (int i = 2; i <= n; i++) {
        if (a[1] != a[i]) {
          cout << "1 " << i << endl;
          x = i;
        } else
          cout << x << " " << i << endl;
      }
    }
  }
}
