#include <bits/stdc++.h>
using namespace std;
void setIO(string name = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if ((int)name.size()) {
    freopen((name + ".in").c_str(), "r", stdin);
    freopen((name + ".out").c_str(), "w", stdout);
  }
}
using ll = long long;
int main() {
  setIO();
  int tt;
  cin >> tt;
  while (tt--) {
    int n;
    cin >> n;
    vector<int> gang(n);
    set<int> second;
    for (auto &i : gang) {
      cin >> i;
      second.insert(i);
    }
    if ((int)second.size() == 1) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    int frst = gang[0];
    vector<bool> vis(n + 1, 0);
    int scnd = 0;
    for (int i = 1; i < n; i++) {
      if (vis[i]) continue;
      if (gang[i] != frst) {
        cout << 1 << " " << i + 1 << '\n';
        scnd = i;
        vis[i] = 1;
      }
    }
    for (int i = 1; i < n; i++) {
      if (vis[i]) continue;
      cout << scnd + 1 << " " << i + 1 << '\n';
    }
  }
  return 0;
}
