Problem: You are given an array a consisting of n integers.

Let min(l, r) be the minimum value among a_l, a_{l + 1}, …, a_r and max(l, r) be the maximum value among a_l, a_{l + 1}, …, a_r.

Your task is to choose three positive (greater than 0) integers x, y and z such that:

  * x + y + z = n; 
  * max(1, x) = min(x + 1, x + y) = max(x + y + 1, n). 



In other words, you have to split the array a into three consecutive non-empty parts that cover the whole array and the maximum in the first part equals the minimum in the second part and equals the maximum in the third part (or determine it is impossible to find such a partition).

Among all such triples (partitions), you can choose any.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 2 ⋅ 10^4) — the number of test cases. Then t test cases follow.

The first line of the test case contains one integer n (3 ≤ n ≤ 2 ⋅ 10^5) — the length of a.

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 i-th element of a.

It is guaranteed that the sum of n does not exceed 2 ⋅ 10^5 (∑ n ≤ 2 ⋅ 10^5).

Output

For each test case, print the answer: NO in the only line if there is no such partition of a that satisfies the conditions from the problem statement. Otherwise, print YES in the first line and three integers x, y and z (x + y + z = n) in the second line.

If there are several answers, you can print any.

Example

Input


6
11
1 2 3 3 3 4 4 3 4 2 1
8
2 9 1 7 3 9 4 1
9
2 1 4 2 4 3 3 1 2
7
4 2 1 1 4 1 4
5
1 1 1 1 1
7
4 3 4 3 3 3 4


Output


YES
6 1 4
NO
YES
2 5 2
YES
4 1 2
YES
1 1 3
YES
2 1 4

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define lchild 2*node
#define rchild 2*node+1
#define mid (l+r)/2
#define mod 1000000007
#define mx 200007
#define pii pair<int,int>
#define pci pair<int,int>
#define ff first
#define ss second
#define piii pair<int,pii>
using namespace std;

int t1[mx][21], lg2[mx], t2[mx][21];
int arr[mx];

void f( int n )
{
    int i, j, k, m, l, r, q;
    lg2[1] = 0;
    for (i = 2; i <= n; i++) lg2[i] = lg2[i / 2] + 1;
    for (i = 1; i <= n; i++) t1[i][0] = arr[i], t2[i][0] = arr[i];
    for (j = 1; j <= 20; j++) for (i = 1; i + (1 << (j - 1)) <= n; i++) t1[i][j] = min(t1[i][j - 1], t1[i + (1 << (j - 1))][j - 1]);
    for (j = 1; j <= 20; j++) for (i = 1; i + (1 << (j - 1)) <= n; i++) t2[i][j] = max(t2[i][j - 1], t2[i + (1 << (j - 1))][j - 1]);        
}

int squery1( int l, int r )
{
    // int ans = min(ans, t[l][i]), l += (1 << i);
    int k = lg2[r - l + 1];
    int ans = min(t1[l][k], t1[r - (1 << k) + 1][k]);

    return ans;
}

int squery2( int l, int r )
{
    // int ans = min(ans, t[l][i]), l += (1 << i);
    int k = lg2[r - l + 1];
    int ans = max(t2[l][k], t2[r - (1 << k) + 1][k]);

    return ans;
}



int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int tc;
    cin >> tc;

    while (tc--)
    {
        int n;
        cin >> n;

        for ( int i = 1; i <= n; i++ )
            cin >> arr[i];

        f(n);

        int pre[n + 5], suff[n + 5];
        pre[1] = arr[1];
        suff[n] = arr[n];

        for ( int i = 2; i <= n; i++ )
            pre[i] = max( pre[i - 1], arr[i] );
        for ( int i = n - 1; i >= 1; i-- )
            suff[i] = max( suff[i + 1], arr[i] );

        bool f= 0;
        int out, lf, rt;

        for ( int i = 2; i < n; i++ )
        {
            int x = arr[i];

            int baam = i, daan = i;

            int l = 1, r = i;

            if ( i > 1 )
            {
                int ans = i;
                while (l <= r)
                {
                    int q = squery1( mid, i );

                    if (q != x)
                        l = mid + 1;
                    else
                        ans = mid, r = mid - 1;
                }

                baam = ans;
            }

            l = i, r = n;

            if ( i < n )
            {
                int ans = i;
                while (l <= r)
                {
                    int q = squery1( i, mid );

                    // cout<<x<<" "<<l<<" "<<r<<" "<<q<<endl;

                    if (q != x)
                        r = mid - 1;
                    else
                        ans = mid, l = mid + 1;
                }

                daan = ans;
            }

            baam= max( baam, 2 );
            daan= min( daan, n-1 );

            if( baam<i and arr[baam]==arr[i] )
                baam++;
            if( daan>i and arr[daan]==arr[i] )
                daan--;

            if( pre[baam-1]==suff[daan+1] and pre[baam-1]==arr[i] )
            {
                f= 1;
                out= daan-baam+1;
                lf= baam-1;
                rt= n-daan;
                break;
            }

            // cout<<i<<" "<<baam<<" "<<daan<<" "<<pre[baam-1]<<" " <<suff[daan+1]<<endl;
        }

        if(f)
            cout<<"YES\n"<<lf<<" "<<out<<" "<<rt<<"\n";
        else
            cout<<"NO\n";

    }
}