#include <bits/stdc++.h>
using namespace std;
long long int m = 1000000007;
long long int n1, n2 = 0, sum = 0;
long long int gcd(long long int a, long long int b) {
  return (b == 0) ? a : gcd(b, a % b);
}
void dfs(long long int x, long long int f, long long int *visited,
         map<long long int, vector<long long int>> m, long long int *a) {
  a[x] = f;
  visited[x] = 1;
  for (auto i : m[x]) {
    if (f == 1) {
      if (visited[i] == 0) {
        dfs(i, 2, visited, m, a);
      }
    } else {
      if (visited[i] == 0) {
        dfs(i, 1, visited, m, a);
      }
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    long long int f = 0;
    long long int i = 0;
    while (i < n - 1) {
      if (a[i] != a[i + 1]) {
        f = 1;
        break;
      } else
        i++;
    }
    if (f == 0) {
      cout << "NO"
           << "\n";
      continue;
    }
    map<long long int, vector<long long int>> m;
    for (long long int i = 0; i < n; i++) {
      m[a[i]].push_back(i + 1);
    }
    long long int p;
    for (auto i : m) {
      p = i.first;
      break;
    }
    long long int q = m[p][0];
    vector<pair<long long int, long long int>> v;
    for (auto i : m) {
      if (i.first != p) {
        for (auto j : i.second) {
          v.push_back({q, j});
        }
      }
    }
    long long int s = 0, pp, qq;
    for (auto i : m) {
      if (s == 1) {
        pp = i.first;
        qq = i.second[0];
        break;
      }
      s++;
    }
    for (auto j : m[p]) {
      if (j != q) {
        v.push_back({qq, j});
      }
    }
    cout << "YES\n";
    for (auto i : v) {
      cout << i.first << ' ' << i.second << "\n";
    }
  }
  return 0;
}
