#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t{};
  cin >> t;
  while (t--) {
    long long int n{};
    cin >> n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    bool visit[n];
    memset(visit, 0, sizeof(visit));
    vector<pair<long long int, long long int>> vec{};
    for (long long int i = 0; i < n; i++) {
      for (long long int j = 0; j < n; j++) {
        if (i != j && a[i] != a[j] && (!visit[i] || !visit[j])) {
          visit[i] = 1;
          visit[j] = 1;
          vec.push_back({i + 1, j + 1});
        }
      }
    }
    if (vec.size() == n - 1) {
      cout << "YES" << '\n';
      for (long long int i = 0; i < n - 1; i++) {
        cout << vec[i].first << " " << vec[i].second << '\n';
      }
    } else {
      cout << "NO" << '\n';
    }
  }
  return 0;
}
