#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int n, color[5005], num[5005];
int main() {
int t;
cin >> t;
while(t--) {
memset(num, 0, sizeof(num));
int tmp;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> color[i];
}
int flag = 1;
for (int i = 2; i <= n; i++) {
if(color[i - 1] != color[i]) {
flag = 0;
}
}
if(flag) {
//cout << endl;
//for (int i = 1; i <= n; i++) cout << color[i] << ' ';
//cout << endl;
cout << "NO" << endl;
} else {
cout << "YES" << endl;
int x = color[1];
for (int i = 2; i <= n; i++) {
if(color[i] != x) {
tmp = i;
cout << 1 << ' ' << i << endl;
num[i] = 1;
}
}
for (int i = 2; i <= n; i++) {
if(num[i] == 0) {
cout << tmp << ' ' << i << endl;
}
}
}
}
return 0;
}
09-18
1111
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-27