#include <bits/stdc++.h>   using namespace std;   int gcd(int a, int b) {     if (b == 0) return a;     return gcd(b, a % b);   }   bool isPrime(long long n) {     long long c;     if (n <= 1) return false;     c = sqrt(n);     for (int i = 2; i <= c; i++)       if (n % i == 0) return false;     return true;   }   int D(long long n) {     int count = 0;     while (n != 0) {       n = n / 10;       ++count;     }     return count;   }   const long long N = 2e5 + 7;   long long l, k, d, tr, n, m, sum, mini, maxi, a, b, c, x, y;   long long t[5007];   set<int> vis;   vector<int> v;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     for (cin >> tr; tr--;) {       cin >> n;       mini = 0;       cin >> t[0];       for (int i = 1; i < n; i++) {         cin >> t[i];         if (t[i] != t[i - 1]) {           a = i;           c = t[i];           b = i - 1;           mini++;         }       }       if (mini) {         cout <<  YES  << endl;         for (int i = 0; i < n; i++) {           if (i != a) {             if (t[i] != c) {               cout << i + 1 <<     << a + 1 << endl;             } else {               cout << i + 1 <<     << b + 1 << endl;             }           }         }       } else {         cout <<  NO  << endl;       }     }   }   