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<cstdio>
#include<cstring>
#include<algorithm>
#define  N  210000
using  namespace  std;
inline  int  mymax(int  x,int  y){return  x>y?x:y;}
inline  int  mymin(int  x,int  y){return  x<y?x:y;}
struct  SEQ
{
	int  l,r;
	SEQ(int  x=0,int  y=0){l=x;r=y;}
};
inline  SEQ  mer(SEQ  x,SEQ  y){return  SEQ(mymin(x.l,y.l),mymax(x.r,y.r));}
int  n,a[N],id[N],be[N],top;
int  sta[N],ll[N],rr[N];
inline  bool  cmp(int  x,int  y){return  a[x]<a[y];}

int  lo2[N],ff[N][20];//17
inline  int  findmin(int  l,int  r)
{
	int  k=lo2[r-l+1];
	return  mymin(ff[l][k],ff[r-(1<<k)+1][k]);
}
inline  void  print_fuck(SEQ  fuck)
{
	printf("YES\n");
	printf("%d %d %d\n",fuck.l-1,fuck.r-fuck.l+1,n-fuck.r);
}
int  main()
{
	for(int  i=2;i<=200000;i++)lo2[i]=lo2[i>>1]+1;
	int  T;scanf("%d",&T);
	while(T--)
	{
		scanf("%d",&n);
		for(int  i=1;i<=n;i++){scanf("%d",&a[i]);id[i]=i;}
		sort(id+1,id+n+1,cmp);
		be[top=0]=a[id[1]]-1;
		for(int  i=1;i<=n;i++)
		{
			if(be[top]!=a[id[i]])top++,be[top]=a[id[i]];
			a[id[i]]=top;
		}
		for(int  i=1;i<=top;i++)rr[i]=0;
		for(int  i=1;i<=n;i++)ff[i][0]=a[i];
		for(int  i=1;i<=lo2[n];i++)
		{
			for(int  j=n-(1<<i)+1;j>=1;j--)ff[j][i]=mymin(ff[j][i-1],ff[j+(1<<(i-1))][i-1]);
		}
		for(int  i=1;i<=n;i++)rr[a[i]]++;
		for(int  i=1;i<=top;i++)rr[i]+=rr[i-1],ll[i]=rr[i];
		for(int  i=n;i>=1;i--)sta[ll[a[i]]--]=i;
		for(int  i=1;i<=top;i++)ll[i]++;
		if(rr[top]-ll[top]+1>=3)
		{
			printf("YES\n");
			printf("%d %d %d\n",sta[ll[top]+1]-1,1,n-sta[ll[top]+1]);
		}
		else
		{
			SEQ  fuck=SEQ(sta[ll[top]],sta[rr[top]]);
			bool  bk=0;
			for(int  i=top-1;i>=1;i--)
			{
				int  shit=findmin(fuck.l,fuck.r);
				if(shit<i)fuck=mer(fuck,SEQ(sta[ll[i]],sta[rr[i]]));
				else  if(shit==i)
				{
					if(sta[ll[i]]<fuck.l  &&  sta[rr[i]]>fuck.r)
					{
						print_fuck(fuck);
						bk=1;
						break;
					}
					else  fuck=mer(fuck,SEQ(sta[ll[i]],sta[rr[i]]));
				}
				else
				{
					if(sta[ll[i]]<fuck.l  &&  sta[rr[i]]>fuck.r  &&  rr[i]-ll[i]+1>=3)
					{
						int  k;
						for(k=ll[i]+1;sta[k+1]<fuck.l;k++);
						if(sta[k]<fuck.l  &&  findmin(sta[k],fuck.r)==i)
						{
							print_fuck(SEQ(sta[k],fuck.r));
							bk=1;
							break;
						}
						if(sta[k]<fuck.l)k++;
						if(k<rr[i]  &&  findmin(fuck.l,sta[k])==i)
						{
							print_fuck(SEQ(fuck.l,sta[k]));
							bk=1;
							break;
						}
					}
					fuck=mer(fuck,SEQ(sta[ll[i]],sta[rr[i]]));
				}
			}
			if(!bk)printf("NO\n");
		}
	}
}