#include <bits/stdc++.h>
using namespace std;
long long dx[] = {0, 0, 1, -1};
long long dy[] = {1, -1, 0, 0};
const long long sz = 100005;
void showArr(long long *arr, long long n) {
  for (long long i = 0; i < n; i++) cout << arr[i] << " ";
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    bool ok = 1;
    for (long long i = 1; i < n; i++) {
      if (a[i] != a[0]) {
        ok = 0;
        break;
      }
    }
    if (ok) {
      cout << "NO"
           << "\n";
      continue;
    } else {
      long long tmp;
      for (long long i = 1; i < n; i++) {
        if (a[i] != a[0]) {
          tmp = i;
          break;
        }
      }
      cout << "YES"
           << "\n";
      for (long long i = 1; i < n; i++) {
        if (a[i] != a[0])
          cout << 1 << " " << i + 1 << "\n";
        else
          cout << tmp + 1 << " " << i + 1 << "\n";
      }
    }
  }
  return 0;
}
