#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, b;
    cin >> n;
    int a[n];
    map<int, int> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
      m[a[i]]++;
    }
    if (m.size() == 1) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      for (int j = 1; j < n; j++) {
        if (a[0] != a[j]) {
          cout << 1 << " " << j + 1 << endl;
        }
      }
      for (int i = 1; i < n; i++) {
        if (a[0] != a[i]) {
          b = i + 1;
          break;
        }
      }
      for (int i = 1; i < n; i++) {
        if (a[i] == a[0]) {
          cout << i + 1 << " " << b << endl;
        }
      }
    }
  }
}
