#include <bits/stdc++.h>
using namespace std;
int T, N;
pair<int, int> a[5001];
int main() {
  cin >> T;
  while (T--) {
    cin >> N;
    for (int i = 1; i <= N; i++) cin >> a[i].first, a[i].second = i;
    sort(a + 1, a + N + 1);
    if (a[1].first == a[N].first) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    int id;
    for (int i = 2; i <= N; i++)
      if (a[i].first != a[1].first) {
        id = i;
        break;
      }
    for (int i = id; i <= N; i++)
      cout << a[1].second << ' ' << a[i].second << endl;
    for (int i = 2; i <= id - 1; i++)
      cout << a[i].second << ' ' << a[id].second << endl;
  }
  return 0;
}
