#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238463;
long long int modfun(long long int a, long long int b) {
  long long int result = 1;
  while (b > 0) {
    if (b & 1) {
      a = a % 1000000007;
      result = (result * a) % 1000000007;
      result = result % 1000000007;
    }
    b = b >> 1;
    a = a % 1000000007;
    a = (a % 1000000007 * a % 1000000007) % 1000000007;
    a = a % 1000000007;
  }
  return result;
}
void debug(vector<long long int> v) {
  for (long long int i = 0; i < v.size(); ++i) {
    cerr << v[i] << " ";
  }
  cerr << "\n";
}
void print(vector<long long int> v) {
  for (long long int i = 0; i < v.size(); ++i) {
    cout << v[i] << " ";
  }
  cout << "\n";
}
void solve() {
  long long int n;
  cin >> n;
  unordered_map<long long int, long long int> m;
  vector<long long int> v(n, 0);
  for (long long int i = 0; i < n; ++i) {
    cin >> v[i];
    m[v[i]]++;
  }
  if (m.size() == 1) {
    cout << "NO"
         << "\n";
    return;
  }
  vector<bool> vis(n, false);
  long long int i = 0, j = 1;
  cout << "YES"
       << "\n";
  long long int count = 0;
  for (i = 0, j = 1; i < n;) {
    if (v[i] != v[j] && (vis[i] == false || vis[j] == false)) {
      vis[i] = true;
      vis[j] = true;
      cout << i + 1 << " " << j + 1 << "\n";
      count++;
    }
    ++j;
    if (j == n) {
      ++i;
      j = i + 1;
    }
    if (count == n - 1) {
      break;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
