#include <bits/stdc++.h>
using namespace std;
int a[1000000];
bool visited[1000000];
vector<int> v[2];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    memset(visited, 0, sizeof visited);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int idx = -1;
    for (int i = 1; i < n; i++) {
      if (a[i] != a[0]) {
        v[0].push_back(i + 1);
        idx = i + 1;
      }
    }
    for (int i = 1; i < n; i++) {
      if (a[i] == a[0]) {
        v[1].push_back(i + 1);
      }
    }
    if (v[0].size() == 0)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      for (int i = 0; i < v[0].size(); i++) cout << 1 << " " << v[0][i] << endl;
      for (int i = 0; i < v[1].size(); i++)
        cout << idx << " " << v[1][i] << endl;
    }
    for (int i = 0; i < 2; i++) v[i].clear();
  }
  return 0;
}
