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>
using namespace std;
#define rep(i,k,n) for(int i = k; i < n; i++)  
#define per(i,k,n) for(int i = k; i >= n; i--)  
#define int long long
#define all(a) a.begin(),a.end()       
#define pb push_back
typedef long long ll; 
typedef pair<int, int> ii;
typedef vector<int> vi;
#define ff first
#define ss second
#define mod 1000000007
#define endl "\n"


int modPow(int a, int b);
int modInv(int a);     

int aa[200005];
int tree[4*200005];

void build(int v, int tl, int tr){
    if(tl==tr){
        tree[v] = aa[tl];
        return;
    //    cout << 11 <<endl;
    }
   
    int tm = (tl+tr)/2;
    build(2*v, tl, tm);
    build(2*v+1, tm+1, tr);
    tree[v] = min(tree[2*v] , tree[2*v+1]);
    return;
}

void update(int val, int pos , int tl, int tr , int v){
    if(tl==tr){
        aa[pos] = val;
        tree[v]=val;
        return;
    }
    int tm = (tl+tr)/2;
    if(pos>tm)update(val,pos, tm+1, tr, 2*v+1);
    else update(val,pos,tl,tm,2*v);
    tree[v]=min(tree[2*v],tree[2*v+1]);
}

int sum(int tl, int tr, int l, int r, int v){
    if(l>r)return 1e18;
    if(tl==l && tr==r){
        return tree[v];
    }
    int tm = (tl+tr)/2;
    int res =1e18;
    res= min(sum(tl, tm, l , min(r,tm), 2*v) , sum(tm+1, tr, max(l,tm+1) , r, 2*v+1));
    return res;
}

void done(int v, int tl, int tr){
    if(tl==tr){
        tree[v] = 0;
        return;
    //    cout << 11 <<endl;
    }
   
    int tm = (tl+tr)/2;
    done(2*v, tl, tm);
    done(2*v+1, tm+1, tr);
    tree[v] = 0;
    return;
}



void solve(){

    int n;
    cin >> n;
    int a[n+1];
    rep(i,0,n)cin >> a[i+1];
    vi vv(n);
    rep(i,0,n)vv[i]=a[i+1];
    sort(all(vv));
    unique(all(vv))-vv.begin();
    rep(i,0,n){
        a[i+1] = lower_bound(all(vv), a[i+1])-vv.begin() +1;
    }

    map<int, vi> x,y;
    map<int, int> ncnt;
    rep(i,0,n){
        ncnt[a[i+1]]++;
    }
    int ma = 0;
    rep(i,0,n){
        ma = max(ma,a[i+1]);
        x[ma].pb(i+1);
    }
    ma=0;
    per(i,n-1,0){
        ma = max(ma,a[i+1]);
        y[ma].pb(i+1);
    }
    int ans = -1;
    rep(i,1,n+1)aa[i]=a[i];
    build(1,1,n);
    //rep(i,1,n+1)cout << a[i] << " ";
    //cout << endl;

    rep(i,1,n+1){
        if(x[a[i]].size() && y[a[i]].size()){
            int a1 = *x[a[i]].rbegin();
            int b1 = *y[a[i]].rbegin();
            if(a1>=b1){
                if(ncnt[a[i]]>=3){
                    int tmp = -1, ff=0;
                    rep(it,b1,a1+1){
                        if(a[it]==a[i] && ff){
                            tmp = it;
                            break;
                        }else if(a[it]==a[i]){
                            ff=1;
                        }
                    }
                    cout << "YES\n";
                    cout <<tmp-1 << " " << 1 << " " << n-(tmp) << endl;
                    return;
                }
            }
        
            if(sum(1,n,a1+1,b1-1,1)==a[i]){
                cout << "YES\n";
                int tmp = -1, ff=0;
                    rep(it,b1,a1+1){
                        if(a[it]==a[i] && ff){
                            tmp = it;
                            break;
                        }else if(a[it]==a[i]){
                            ff=1;
                        }
                    }
                cout << a1 << " " << b1-a1-1 << " " << n-(b1-1) << endl;
                return; 
            }
            if(x[a[i]].size()>1){
                a1 = *(x[a[i]].rbegin()+1);
                if(sum(1,n,a1+1,b1-1,1)==a[i]){
                    cout << "YES\n";
                    int tmp = -1, ff=0;
                        rep(it,b1,a1+1){
                            if(a[it]==a[i] && ff){
                                tmp = it;
                                break;
                            }else if(a[it]==a[i]){
                                ff=1;
                            }
                        }
                    cout << a1 << " " << b1-a1-1 << " " << n-(b1-1) << endl;
                    return; 
                }
                a1 = *x[a[i]].rbegin();
            }
            if(y[a[i]].size()>1){
                b1 = *(y[a[i]].rbegin()+1);
                if(sum(1,n,a1+1,b1-1,1)==a[i]){
                    cout << "YES\n";
                    int tmp = -1, ff=0;
                        rep(it,b1,a1+1){
                            if(a[it]==a[i] && ff){
                                tmp = it;
                                break;
                            }else if(a[it]==a[i]){
                                ff=1;
                            }
                        }
                    cout << a1 << " " << b1-a1-1 << " " << n-(b1-1) << endl;
                    return; 
                }
                b1 = *y[a[i]].rbegin();
            }
        }
    }
    cout << "NO\n";
    done(1,1,n);

}


signed main(){

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //cout << fixed;
    //cout <<setprecision(6);
    int test=1; cin >> test; while(test--)
    solve();
}

int modPow(int a, int b){
    if(b==0)return 1;
    if(b%2==0){
        int x = a*a;
        x%=mod;
        return modPow(x,b/2);
    }
    return (a*modPow(a,b-1))%mod;
}


int modInv(int a){
    return modPow(a,mod-2);
}