#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  unordered_set<long long int> s(a, a + n);
  if (s.size() == 1) {
    cout << "NO" << '\n';
    return;
  } else {
    cout << "YES" << '\n';
  }
  long long int node1 = a[0];
  long long int node2 = -1, j = -1;
  ;
  for (long long int i = 1; i < n; i++) {
    if (a[i] != node1) {
      node2 = a[i];
      j = i + 1;
      break;
    }
  }
  vector<pair<long long int, long long int> > ans;
  for (long long int i = 1; i < n; i++) {
    if (a[i] != node1) {
      ans.push_back({1, i + 1});
    } else {
      ans.push_back({j, i + 1});
    }
  }
  for (auto x : ans) cout << x.first << " " << x.second << '\n';
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
