#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  ~debug() { cerr << endl; }
  template <class c>
  typename enable_if<sizeof dud<c>(0) != 1, debug &>::type operator<<(c i) {
    cerr << boolalpha << i;
    return *this;
  }
  template <class c>
  typename enable_if<sizeof dud<c>(0) == 1, debug &>::type operator<<(c i) {
    return *this << range(begin(i), end(i));
  }
  template <class c, class b>
  debug &operator<<(pair<b, c> d) {
    return *this << "(" << d.first << ", " << d.second << ")";
  }
  template <class c>
  debug &operator<<(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it) *this << ", " + 2 * (it == d.b) << *it;
    return *this << "]";
  }
};
void solve() {
  int n;
  cin >> n;
  map<int, int> mp;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    mp[arr[i]]++;
  }
  if (mp.size() == 1) {
    cout << "NO" << endl;
    return;
  }
  int id, mi = INT_MAX;
  for (auto it : mp) {
    if (it.second < mi) {
      id = it.second;
      mi = it.first;
    }
  }
  vector<int> mint;
  vector<int> other;
  for (int i = 0; i < n; i++) {
    if (arr[i] == mi)
      mint.push_back(i);
    else
      other.push_back(i);
  }
  debug() << " ["
          << "mint"
             ": "
          << (mint) << "] ";
  debug() << " ["
          << "other"
             ": "
          << (other) << "] ";
  cout << "YES" << endl;
  for (auto it : other) {
    cout << it + 1 << " " << mint.front() + 1 << endl;
  }
  for (int i = 1; i < mint.size(); i++) {
    cout << mint[i] + 1 << " " << other.front() + 1 << endl;
  }
}
int main() {
  long long int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
