#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, arr[5005], different = 0, second = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      if (i >= 1 && second == 0 && arr[i] != arr[0]) {
        second = i;
      }
    }
    if (second == 0) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    for (int i = 1; i < n; i++) {
      if (arr[i] == arr[0])
        cout << second + 1 << " " << i + 1 << endl;
      else
        cout << 1 << " " << i + 1 << endl;
    }
  }
  return 0;
}
