#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
void sample() {}
long long int* read(long long int n) {
  long long int* arr = new long long int[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  return arr;
}
void solve() {
  long long int n, i, j, k, anss, m, o;
  cin >> n;
  long long int dis[5005] = {0};
  map<long long int, vector<long long int>> map;
  long long int gr = 0, sr = 0, pos = 0, maxi = 0, mini = INT_MAX;
  for (i = 1; i <= n; i++) {
    cin >> j;
    if (i == 1) {
      gr = j;
    }
    dis[i] = j;
    maxi = max(maxi, j);
    mini = min(mini, j);
  }
  if (maxi == mini) {
    cout << "NO" << endl;
    return;
  }
  gr = dis[1];
  dis[1] = 0;
  vector<pair<long long int, long long int>> ans;
  bool check = 0;
  for (i = 1; i < 5005; i++) {
    if (dis[i] != gr && dis[i] > 0) {
      sr = dis[i];
      pos = i;
      break;
    }
  }
  for (i = 1; i < 5005; i++) {
    if (dis[i] != gr && dis[i] > 0) {
      ans.push_back({i, 1});
      dis[i] = 0;
    }
  }
  for (i = 0; i < 5005; i++) {
    if (dis[i] != 0) {
      ans.push_back({i, pos});
    }
  }
  if (ans.size() > 0) {
    cout << "YES" << endl;
    for (i = 0; i < ans.size(); i++) {
      cout << ans[i].first << " " << ans[i].second << endl;
    }
    return;
  }
  cout << "NO" << endl;
  return;
}
int main() {
  fast();
  sample();
  long long int i, j, k, n, m, a, b, c, d, p, q, r, l, t = 1;
  long long int sum, count = 0, ans = 0;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
