#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
vector<int> lk(N);
vector<int> sz(N);
int find(int x) {
  while (x != lk[x]) x = lk[x];
  return x;
}
void unite(int a, int b) {
  a = find(a);
  b = find(b);
  if (sz[a] < sz[b]) swap(a, b);
  sz[a] += sz[b];
  lk[b] = a;
}
void ds_init() {
  for (int i = 0; i < N; i++) {
    lk[i] = i;
    sz[i] = 1;
  }
}
void solve() {
  ds_init();
  int n;
  cin >> n;
  vector<int> A(n);
  for (int &a : A) cin >> a;
  vector<pair<int, int>> ans;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (find(i) != find(j) && A[i] != A[j]) {
        unite(i, j);
        ans.emplace_back(i + 1, j + 1);
      }
  if ((int)ans.size() == n - 1) {
    cout << "YES\n";
    for (auto p : ans) cout << p.first << ' ' << p.second << '\n';
  } else {
    cout << "NO\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
