There are n districts in the town, the i-th district belongs to the a_i-th bandit gang. Initially, no districts are connected to each other.

You are the mayor of the city and want to build n-1 two-way roads to connect all districts (two districts can be connected directly or through other connected districts).

If two districts belonging to the same gang are connected directly with a road, this gang will revolt.

You don't want this so your task is to build n-1 two-way roads in such a way that all districts are reachable from each other (possibly, using intermediate districts) and each pair of directly connected districts belong to different gangs, or determine that it is impossible to build n-1 roads to satisfy all the conditions.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 500) — the number of test cases. Then t test cases follow.

The first line of the test case contains one integer n (2 ≤ n ≤ 5000) — the number of districts. The second line of the test case contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^9), where a_i is the gang the i-th district belongs to.

It is guaranteed that the sum of n does not exceed 5000 (∑ n ≤ 5000).

Output

For each test case, print:

  * NO on the only line if it is impossible to connect all districts satisfying the conditions from the problem statement. 
  * YES on the first line and n-1 roads on the next n-1 lines. Each road should be presented as a pair of integers x_i and y_i (1 ≤ x_i, y_i ≤ n; x_i ≠ y_i), where x_i and y_i are two districts the i-th road connects. 



For each road i, the condition a[x_i] ≠ a[y_i] should be satisfied. Also, all districts should be reachable from each other (possibly, using intermediate districts).

Example

Input


4
5
1 2 2 1 3
3
1 1 1
4
1 1000 101 1000
4
1 2 3 4


Output


YES
1 3
3 5
5 4
1 2
NO
YES
1 2
2 3
3 4
YES
1 2
1 3
1 4
#include <bits/stdc++.h>
using namespace std;
long long int ESP = 1e18;
bool isPrime[5000005];
void sieve(long long int N) {
  for (long long int i = 0; i <= N; ++i) {
    isPrime[i] = true;
  }
  isPrime[0] = false;
  isPrime[1] = false;
  for (int i = 2; i * i <= N; ++i) {
    if (isPrime[i] == true) {
      for (int j = i * i; j <= N; j += i) isPrime[j] = false;
    }
  }
}
bool anagram(char *s1, char *s2) {
  long long int count[256];
  memset(count, 0, sizeof(count));
  long long int i;
  for (i = 0; s1[i] && s2[i]; i++) {
    count[s1[i]]++;
    count[s2[i]]--;
  }
  if (s1[i] || s2[i]) {
    return false;
  }
  for (long long int i = 0; i < 256; i++) {
    if (count[i]) {
      return false;
    }
  }
  return true;
}
int find_largest_digit(int n) {
  int mx = 0;
  while (n > 0) {
    mx = max(mx, n % 10);
    n /= 10;
  }
  return mx;
}
long long int no_of_digits(long long int n) {
  long long int ans = 0;
  while (n > 0) {
    ans++;
    n /= 10;
  }
  return ans;
}
long long int moduloMultiplication(long long int a, long long int b,
                                   long long int zz) {
  long long int res = 0;
  a %= zz;
  while (b) {
    if (b & 1) res = (res + a) % zz;
    a = (2 * a) % zz;
    b >>= 1;
  }
  return res;
}
long long int convert(string s) {
  bool o = true;
  long long int ans = 0;
  for (long long int i = 0; i < s.length(); i++) {
    ans = ans * 10 + (s[i] - 48);
  }
  return ans;
}
inline long long int powmod(long long int a, long long int b,
                            long long int modulo) {
  if (b == 0 || a == 1) return 1;
  long long int half = powmod(a, (b / 2), modulo) % modulo;
  long long int full = (half * half) % modulo;
  if (b % 2) return (full * a) % modulo;
  return full % modulo;
}
long long int poww(long long int a, long long int b) {
  if (b == 0 || a == 1) return 1;
  long long int half = poww(a, (b / 2));
  if (half < 0 || half > ESP) return -1;
  long long int full = (half * half);
  if (half != 0 && full / half != half) {
    return -1;
  }
  if (b % 2) {
    if (full * a < 0 || full * a > ESP) return -1;
  }
  if (full < 0 || full > ESP) return -1;
  if (b % 2) {
    long long int x = a * full;
    if (a != 0 && x / a != full) {
      return -1;
    }
    return (x);
  }
  return full;
}
long long int invmod(long long int a, long long int modulo) {
  long long int check = powmod(a, modulo - 2, modulo) % modulo;
  return check;
}
long long int max(long long int a, long long int b) {
  if (a > b) {
    return a;
  }
  return b;
}
long long int min(long long int a, long long int b) {
  if (a < b) {
    return a;
  }
  return b;
}
long long int min(long long int a, int b) {
  if (a < b) return a;
  return b;
}
long long int min(int a, long long int b) {
  if (a < b) return a;
  return b;
}
long long int max(long long int a, int b) {
  if (a > b) return a;
  return b;
}
long long int max(int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
void yes() {
  cout << "YES"
       << "\n";
}
void no() {
  cout << "NO"
       << "\n";
}
vector<int> factorize(int n) {
  vector<int> res;
  for (int i = 2; i * i <= n; ++i) {
    while (n % i == 0) {
      res.push_back(i);
      n /= i;
    }
  }
  if (n != 1) {
    res.push_back(n);
  }
  return res;
}
void printDivisors(int n) {
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        printf("%d ", i);
      else
        printf("%d %d ", i, n / i);
    }
  }
}
int phi(int n) {
  int result = n;
  for (int p = 2; p * p <= n; ++p) {
    if (n % p == 0) {
      while (n % p == 0) n /= p;
      result -= result / p;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
long long prr[] = {2,   3,   5,   7,   11,  13,  17,  19,  23,  29,  31,  37,
                   41,  43,  47,  53,  59,  61,  67,  71,  73,  79,  83,  89,
                   97,  101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151,
                   157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223,
                   227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
                   283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359,
                   367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
                   439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499};
long chocolate(vector<int> arr) {
  int n = arr.size();
  vector<long> ans(n, 1);
  for (int i = 1; i < n; i++) {
    if (arr[i] > arr[i - 1])
      ans[i] = ans[i - 1] + 1;
    else if (arr[i] == arr[i - 1])
      ans[i] = ans[i - 1];
  }
  long int count = ans[n - 1];
  for (int j = n - 2; j >= 0; j--) {
    if (arr[j] > arr[j + 1]) ans[j] = max(ans[j], ans[j + 1] + 1);
    count += ans[j];
  }
  for (auto x : ans) cout << x << " ";
  cout << "\n";
  ;
  return count;
}
void solve() {
  long long int n;
  cin >> n;
  priority_queue<long long int> pq1, pq2;
  cout << 2 << "\n";
  ;
  if (n == 2) {
    cout << 1 << " " << 2 << "\n";
    ;
    return;
  }
  for (long long int i = 1; i < n + 1; i++) {
    if (i % 2)
      pq2.push(i);
    else
      pq1.push(i);
  }
  {
    for (long long int j = 1; j < n; j++) {
      auto x = pq1.top();
      auto y = pq2.top();
      if (x >= y) {
        auto ans1 = pq1.top();
        pq1.pop();
        auto ans2 = pq1.top();
        pq1.pop();
        cout << ans1 << " " << ans2 << "\n";
        ;
        auto avg = (ans1 + ans2) / 2;
        (avg % 2) ? pq2.push(avg) : pq1.push(avg);
      } else {
        auto ans1 = pq2.top();
        pq2.pop();
        auto ans2 = pq2.top();
        pq2.pop();
        cout << ans1 << " " << ans2 << "\n";
        ;
        auto avg = (ans1 + ans2) / 2;
        (avg % 2) ? pq2.push(avg) : pq1.push(avg);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  long long int a[5] = {0, 1, 3, 6, 10};
  while (t--) {
    long long int n;
    cin >> n;
    map<long long int, vector<long long int>> mp;
    bool f = 0;
    vector<long long int> a(n);
    for (auto i = 0; i < n; i++) {
      cin >> a[i];
      mp[a[i]].push_back(i);
    }
    if (mp.begin()->second.size() == n) {
      no();
      continue;
    }
    yes();
    auto j = mp.begin()->second[0];
    long long int last;
    for (auto i = mp.begin(); i != mp.end(); i++) {
      if (i == mp.begin()) continue;
      vector<long long int> v = i->second;
      for (auto x : v) {
        cout << j + 1 << " " << x + 1 << endl;
        last = x;
      }
    }
    for (auto i = 1; i < mp.begin()->second.size(); i++) {
      cout << last + 1 << " " << mp.begin()->second[i] + 1 << endl;
    }
  }
  return 0;
}
