#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int arr[n];
  set<int> st;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    st.insert(arr[i]);
  }
  if (st.size() == 1) {
    cout << "NO";
    return;
  }
  cout << "YES" << endl;
  int curr = 0;
  for (int i = 1; i < n; i++) {
    if (arr[i] != arr[0]) {
      cout << "1"
           << " " << i + 1 << endl;
      curr = i;
    }
  }
  for (int i = 1; i < n; i++) {
    if (arr[i] == arr[0]) {
      cout << curr + 1 << " " << i + 1 << endl;
    }
  }
}
signed main() {
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
    cout << endl;
  }
}
