#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[5005];
int ans[5005];
map<int, vector<int>> mp;
map<int, vector<int>>::iterator ii, jj;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int i, j, k, l, r, m, n, t, x, y;
  cin >> t;
  while (t--) {
    mp.clear();
    memset(ans, 0, sizeof(ans));
    cin >> n;
    for (i = 1; i <= n; i++) {
      cin >> x;
      mp[x].push_back(i);
    }
    if (mp.size() == 1) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      jj = ii = mp.begin();
      ii++;
      for (i = 1; i < jj->second.size(); i++) {
        cout << ii->second[0] << " " << jj->second[i] << endl;
      }
      for (; ii != mp.end(); ii++) {
        for (i = 0; i < ii->second.size(); i++) {
          cout << jj->second[0] << " " << ii->second[i] << endl;
        }
      }
    }
  }
  return 0;
}
