#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[5001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i].first;
      a[i].second = i + 1;
    }
    sort(a, a + n);
    if (a[0].first == a[n - 1].first) {
      cout << "NO\n";
      continue;
    } else {
      cout << "YES\n";
      int i = 1, j = n - 1;
      while (a[0].first != a[j].first) {
        cout << a[0].second << ' ' << a[j].second << '\n';
        j--;
      }
      while (a[i].first == a[0].first) {
        cout << a[i].second << ' ' << a[n - 1].second << '\n';
        i++;
      }
    }
  }
  return 0;
}
