#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, pr, vr, mas[5000], apr, avr;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n;
    pr = 0;
    vr = 0;
    for (int j = 0; j < n; j++) {
      cin >> mas[j];
      if (!pr) {
        pr = mas[j];
        apr = j;
      } else if (!vr) {
        if (mas[j] != pr) {
          cout << "YES" << endl;
          vr = mas[j];
          avr = j;
          for (int h = 0; h < j; h++) cout << h + 1 << ' ' << j + 1 << endl;
        }
      } else {
        if (mas[j] != pr)
          cout << apr + 1 << ' ' << j + 1 << endl;
        else
          cout << avr + 1 << ' ' << j + 1 << endl;
      }
    }
    if (!vr) cout << "NO" << endl;
  }
  return 0;
}
