#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    int k = 0, j = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (i > 0 && a[i] != a[0]) {
        j = i;
        k = 1;
      }
    }
    if (k == 0) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      int count = 0;
      int c = 0;
      for (int i = 1; i < n; i++) {
        if (a[i] == a[0]) {
          cout << i + 1 << " " << j + 1 << "\n";
        }
        if (a[i] != a[0]) {
          cout << 1 << " " << i + 1 << "\n";
        }
      }
    }
  }
}
