// Template begins
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <stdio.h>
#include <stack>
#include <math.h>
#include <complex>

using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define fo(i,a,b) for(i=a;i<=b;i++)
#define all(v) (v).begin(),(v).end()
#define sort0(v) sort(all(v))
#define lbb(a,b,arr,x) lower_bound(arr+a,arr+b+1,x)-arr
#define ubb(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-arr
#define freq(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-lower_bound(arr+a,arr+b+1,x)
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define d0(x) cout<<(x)<<" "
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define d5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<endl
#define d6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<endl
#define max3(a,b,c) max(max((a),(b)),(c))
#define max4(a,b,c,d) max(max((a),(b)),max((c),(d)))
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
#define printp(x) cout << x.ff << " " << x.ss << endl
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    for(auto v : V) os << v << " ";
    return cout << "";
}
template<class T> ostream& operator<<(ostream &os, set<T> S){
    for(auto s:S) os<<s<<" ";
    return cout << "";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << P.first << " " << P.second;
}
const ll mod=1e9+7;
#define inf 9999999999999

ll inv(ll i){if(i==1) return 1;return (mod-((mod/i)*inv(mod%i))%mod)%mod;}

ll gcd(ll a,ll b){ if (b==0) return a;return gcd(b,a%b);}

ll pwr(ll a, ll b) {a %= mod; ll res = 1;while (b > 0) {if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1;}return res;}
//Template ends

ll a[200010], t[800010],T[800010];
int n;
void buildm(int v, int tl, int tr){
    if(tl>tr) return;
    if(tl==tr){
        t[v] = a[tl];
        return;
    }
    
    int tm = (tl+tr)/2;
    buildm(2*v,tl,tm);
    buildm(2*v+1,tm+1,tr);
    
    t[v] = min(t[2*v], t[2*v+1]);
}

void buildM(int v, int tl, int tr){
    if(tl>tr) return;
    if(tl==tr){
        T[v] = a[tl];
        return;
    }
    
    int tm = (tl+tr)/2;
    buildM(2*v,tl,tm);
    buildM(2*v+1,tm+1,tr);
    
    T[v] = max(T[2*v], T[2*v+1]);
}

ll minq(int v, int tl, int tr, int l, int r){
    if(l>tr or r<tl) return 1000000000;
    
    if(tl==l and tr==r){
        return t[v];
    }
    
    int tm = (tl+tr)/2;
    return min(minq(2*v,tl,tm,l,min(r,tm)),minq(2*v+1,tm+1,tr,max(tm+1,l),r));
}

ll minn(int l,int r){
    return minq(1,1,n,l,r);
}


ll maxq(int v, int tl, int tr, int l, int r){
    if(l>tr or r<tl) return 0;
    
    if(tl==l and tr==r){
        return T[v];
    }
    
    int tm = (tl+tr)/2;
    return max(maxq(2*v,tl,tm,l,min(r,tm)),maxq(2*v+1,tm+1,tr,max(tm+1,l),r));
}

ll maxx(int l,int r){
    return maxq(1,1,n,l,r);
}

int main(){
    fio;
    int t0,i;
    cin >> t0;
    while(t0--){
        cin >> n;
        for(i=1;i<=n;i++) cin >> a[i];
        buildm(1,1,n);
        buildM(1,1,n);
        
        ll curr = 0;

        bool z = false;
        
        for(i=1;i<=n;i++){
            curr = max(curr, a[i]);
            
            int l = i+1;
            int r = n-1;
            
            while(l<=r){
                int mid = (l+r)/2;
                ll val1 = minn(i+1,mid);
                ll val2 = maxx(mid+1,n);
                
                //d5(i,mid,val1,val2,curr);
                
                if(val1 == val2 and val1 == curr){
                    z = true;
                    d1("YES");
                    d3(i,mid-i,n-mid);
                    break;
                }
                
                if(val1 < curr or (val1 == curr and val2 < curr)){
                    r = mid - 1;
                }
                else{
                    l = mid + 1;
                }
            }
            
            if(z) break;
        }
        
        if(z){
            continue;
        }
        else{
            d1("NO");
        }
    }
}

### Prompt

Please create a solution in cpp to the following 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

### Response

```cpp
// Template begins
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <stdio.h>
#include <stack>
#include <math.h>
#include <complex>

using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define fo(i,a,b) for(i=a;i<=b;i++)
#define all(v) (v).begin(),(v).end()
#define sort0(v) sort(all(v))
#define lbb(a,b,arr,x) lower_bound(arr+a,arr+b+1,x)-arr
#define ubb(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-arr
#define freq(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-lower_bound(arr+a,arr+b+1,x)
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define d0(x) cout<<(x)<<" "
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define d5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<endl
#define d6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<endl
#define max3(a,b,c) max(max((a),(b)),(c))
#define max4(a,b,c,d) max(max((a),(b)),max((c),(d)))
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
#define printp(x) cout << x.ff << " " << x.ss << endl
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    for(auto v : V) os << v << " ";
    return cout << "";
}
template<class T> ostream& operator<<(ostream &os, set<T> S){
    for(auto s:S) os<<s<<" ";
    return cout << "";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << P.first << " " << P.second;
}
const ll mod=1e9+7;
#define inf 9999999999999

ll inv(ll i){if(i==1) return 1;return (mod-((mod/i)*inv(mod%i))%mod)%mod;}

ll gcd(ll a,ll b){ if (b==0) return a;return gcd(b,a%b);}

ll pwr(ll a, ll b) {a %= mod; ll res = 1;while (b > 0) {if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1;}return res;}
//Template ends

ll a[200010], t[800010],T[800010];
int n;
void buildm(int v, int tl, int tr){
    if(tl>tr) return;
    if(tl==tr){
        t[v] = a[tl];
        return;
    }
    
    int tm = (tl+tr)/2;
    buildm(2*v,tl,tm);
    buildm(2*v+1,tm+1,tr);
    
    t[v] = min(t[2*v], t[2*v+1]);
}

void buildM(int v, int tl, int tr){
    if(tl>tr) return;
    if(tl==tr){
        T[v] = a[tl];
        return;
    }
    
    int tm = (tl+tr)/2;
    buildM(2*v,tl,tm);
    buildM(2*v+1,tm+1,tr);
    
    T[v] = max(T[2*v], T[2*v+1]);
}

ll minq(int v, int tl, int tr, int l, int r){
    if(l>tr or r<tl) return 1000000000;
    
    if(tl==l and tr==r){
        return t[v];
    }
    
    int tm = (tl+tr)/2;
    return min(minq(2*v,tl,tm,l,min(r,tm)),minq(2*v+1,tm+1,tr,max(tm+1,l),r));
}

ll minn(int l,int r){
    return minq(1,1,n,l,r);
}


ll maxq(int v, int tl, int tr, int l, int r){
    if(l>tr or r<tl) return 0;
    
    if(tl==l and tr==r){
        return T[v];
    }
    
    int tm = (tl+tr)/2;
    return max(maxq(2*v,tl,tm,l,min(r,tm)),maxq(2*v+1,tm+1,tr,max(tm+1,l),r));
}

ll maxx(int l,int r){
    return maxq(1,1,n,l,r);
}

int main(){
    fio;
    int t0,i;
    cin >> t0;
    while(t0--){
        cin >> n;
        for(i=1;i<=n;i++) cin >> a[i];
        buildm(1,1,n);
        buildM(1,1,n);
        
        ll curr = 0;

        bool z = false;
        
        for(i=1;i<=n;i++){
            curr = max(curr, a[i]);
            
            int l = i+1;
            int r = n-1;
            
            while(l<=r){
                int mid = (l+r)/2;
                ll val1 = minn(i+1,mid);
                ll val2 = maxx(mid+1,n);
                
                //d5(i,mid,val1,val2,curr);
                
                if(val1 == val2 and val1 == curr){
                    z = true;
                    d1("YES");
                    d3(i,mid-i,n-mid);
                    break;
                }
                
                if(val1 < curr or (val1 == curr and val2 < curr)){
                    r = mid - 1;
                }
                else{
                    l = mid + 1;
                }
            }
            
            if(z) break;
        }
        
        if(z){
            continue;
        }
        else{
            d1("NO");
        }
    }
}

```