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 PYTHON3):

Solution:
import sys
input=sys.stdin.buffer.readline #FOR READING PURE INTEGER INPUTS (space separation ok)
import math 
#MIN QUERIES
class RMQMIN(): #for MIN queries
    def __init__(self,arr):
        self.arr=arr
        MAXN=len(arr)
        K=int(math.log2(MAXN))+1
        self.lookup=[[0 for _ in range(K+1)] for __ in range(MAXN)]
        self.buildSparseTable()
    def buildSparseTable(self): 
        n=len(self.arr)
        for i in range(0, n):  
            self.lookup[i][0] = self.arr[i]  
        j = 1
        while (1 << j) <= n:
            i = 0
            while (i + (1 << j) - 1) < n:
                if (self.lookup[i][j-1]<self.lookup[i+(1<<(j-1))][j-1]):self.lookup[i][j]=self.lookup[i][j-1]  
                else:self.lookup[i][j]=self.lookup[i + (1 << (j - 1))][j - 1]
                i += 1
            j += 1
    def query(self,L,R): #returns min on interval [l,r)
        R-=1
        j = int(math.log2(R - L + 1))
        if self.lookup[L][j] <= self.lookup[R - (1 << j) + 1][j]:  
            return self.lookup[L][j]
        else: 
            return self.lookup[R - (1 << j) + 1][j]  
#min query usage:
#a = [7, 2, 3, 0, 5,1,3,4,63,2,4,5,6,7,22]  
#rmq=RMQMIN(a)
#rmq.query(6,len(a))
def min2(l,r):
    return rmq.query(l,r+1)
from collections import defaultdict as d
t=int(input())
for _ in range(t):
    n=int(input())
    a=[int(x) for x in input().split()]
    rmq=RMQMIN(a)
    
    indexes=d(lambda:[])
    
    leftMax=[0 for _ in range(n)]
    for i,x in enumerate(a):
        indexes[x].append(i)
        leftMax[i]=x
        if i>0:
            leftMax[i]=max(leftMax[i],leftMax[i-1])
    rightMax=[0 for _ in range(n)]
    for i in range(n-1,-1,-1):
        rightMax[i]=a[i]
        if i+1<n:
            rightMax[i]=max(rightMax[i],rightMax[i+1])
            
#    nearestRightSmaller=[n-1 for _ in range(n)] #nearest idx on the right that is smaller
#    incStack=[]
#    for i,x in enumerate(a):
#        while incStack and x<a[incStack[-1]]:
#            top=incStack.pop()
#            nearestRightSmaller[top]=i
#        incStack.append(i)
    
    found=False
    for l in range(n-2):
        val=leftMax[l]
        
        #Condition 1:rightMax[r]==val. Find leftmost r1 where rightMax[r1]==val. r>=r1
        i=0
        b=n
        while b>0:
            while i+b<n and rightMax[i+b]>val:
                i+=b
            b//=2
        r1=i+1
        if r1==n or rightMax[r1]!=val:
            continue
        
        temp=indexes[val]
        i=0
        b=len(temp)
        while b>0:
            while b+i<len(temp) and temp[b+i]<=l:
                i+=b
            b//=2
        if i+1<len(temp) and a[temp[i+1]]==val:
            nearestNextIdx=temp[i+1] #this index must be in the middle segment. Condition 2: r>nearestNextIdx
            r=max(nearestNextIdx+1,r1)
            if r<n and min2(l+1,r-1)==val and rightMax[r]==val: #found
                x=l+1
                y=r-x
                z=n-x-y
                found=True
                break
    if found:
        print('YES')
        print('{} {} {}'.format(x,y,z))
#        print('l:{} r:{}'.format(l,r))
    else:
        print('NO')