#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
pair<int, int> a[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    bool flag = true;
    for (int i = 1; i <= n; i++) {
      int x;
      cin >> x;
      a[i].first = x;
      a[i].second = i;
      if (a[1].first != x) flag = false;
    }
    if (flag) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    sort(a + 1, a + 1 + n);
    int num = 1;
    int x = 0;
    for (int i = 2; i <= n; i++) {
      if (a[1].first == a[i].first)
        num++;
      else {
        if (!flag) {
          x = a[i].second;
          flag = true;
        }
        cout << a[1].second << " " << a[i].second << endl;
      }
    }
    for (int i = 2; i <= n; i++) {
      if (a[i].first == a[1].first) {
        cout << a[i].second << " " << x << endl;
      }
    }
  }
  return 0;
}
