#include <bits/stdc++.h>
using namespace std;
int compare(const void *x1, const void *x2) {
  return (*(int *)x2 - *(int *)x1);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    pair<int, int> foo;
    pair<int, int> boo;
    vector<int> a(n);
    cin >> a[0];
    foo = make_pair(a[0], 1);
    bool k = false, p = true;
    for (int i = 1; i < n; i++) {
      cin >> a[i];
      if (a[i] != foo.first) {
        if (p) {
          boo = make_pair(a[i], i + 1);
          p = false;
          k = true;
        }
      }
    }
    if (k) {
      cout << "YES ";
      for (int i = 0; i < n; i++) {
        if (a[i] != foo.first) {
          if (i != boo.second - 1) cout << i + 1 << " " << foo.second << " ";
        } else {
          cout << i + 1 << " " << boo.second << " ";
        }
      }
    } else
      cout << "NO ";
  }
}
