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:
"""
    Author - Satwik Tiwari .
    24th NOV , 2020  - Tuesday
"""

#===============================================================================================
#importing some useful libraries.

from __future__ import division, print_function
# from fractions import Fraction
# import sys
# import os
# from io import BytesIO, IOBase
# from functools import cmp_to_key

# from itertools import *
# from heapq import *
# from math import gcd, factorial,floor,ceil,sqrt

# from copy import deepcopy
# from collections import deque


from bisect import bisect_left as bl
# from bisect import bisect_right as br
# from bisect import bisect

#==============================================================================================
#fast I/O region
# BUFSIZE = 8192
#
#
# class FastIO(IOBase):
#     newlines = 0
#
#     def __init__(self, file):
#         self._fd = file.fileno()
#         self.buffer = BytesIO()
#         self.writable = "x" in file.mode or "r" not in file.mode
#         self.write = self.buffer.write if self.writable else None
#
#     def read(self):
#         while True:
#             b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
#             if not b:
#                 break
#             ptr = self.buffer.tell()
#             self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
#         self.newlines = 0
#         return self.buffer.read()
#
#     def readline(self):
#         while self.newlines == 0:
#             b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
#             self.newlines = b.count(b"\n") + (not b)
#             ptr = self.buffer.tell()
#             self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
#         self.newlines -= 1
#         return self.buffer.readline()
#
#     def flush(self):
#         if self.writable:
#             os.write(self._fd, self.buffer.getvalue())
#             self.buffer.truncate(0), self.buffer.seek(0)
#
#
# class IOWrapper(IOBase):
#     def __init__(self, file):
#         self.buffer = FastIO(file)
#         self.flush = self.buffer.flush
#         self.writable = self.buffer.writable
#         self.write = lambda s: self.buffer.write(s.encode("ascii"))
#         self.read = lambda: self.buffer.read().decode("ascii")
#         self.readline = lambda: self.buffer.readline().decode("ascii")
#
#
# def print(*args, **kwargs):
#     """Prints the values to a stream, or to sys.stdout by default."""
#     sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
#     at_start = True
#     for x in args:
#         if not at_start:
#             file.write(sep)
#         file.write(str(x))
#         at_start = False
#     file.write(kwargs.pop("end", "\n"))
#     if kwargs.pop("flush", False):
#         file.flush()
#
#
# if sys.version_info[0] < 3:
#     sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
# else:
#     sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

#===============================================================================================
# ### START ITERATE RECURSION ###
# from types import GeneratorType
# def iterative(f, stack=[]):
#   def wrapped_func(*args, **kwargs):
#     if stack: return f(*args, **kwargs)
#     to = f(*args, **kwargs)
#     while True:
#       if type(to) is GeneratorType:
#         stack.append(to)
#         to = next(to)
#         continue
#       stack.pop()
#       if not stack: break
#       to = stack[-1].send(to)
#     return to
#   return wrapped_func
# #### END ITERATE RECURSION ####

#===============================================================================================
#some shortcuts

def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
# def graph(vertex): return [[] for i in range(0,vertex+1)]
def testcase(t):
    for pp in range(t):
        solve(pp)
# def google(p):
#     print('Case #'+str(p)+': ',end='')
# def lcm(a,b): return (a*b)//gcd(a,b)
# def power(x, y, p) :
#     y%=(p-1)  #not so sure about this. used when y>p-1. if p is prime.
#     res = 1     # Initialize result
#     x = x % p  # Update x if it is more , than or equal to p
#     if (x == 0) :
#         return 0
#     while (y > 0) :
#         if ((y & 1) == 1) : # If y is odd, multiply, x with result
#             res = (res * x) % p
#
#         y = y >> 1      # y = y/2
#         x = (x * x) % p
#     return res
# def ncr(n,r): return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))
# def isPrime(n) :
#     if (n <= 1) : return False
#     if (n <= 3) : return True
#     if (n % 2 == 0 or n % 3 == 0) : return False
#     i = 5
#     while(i * i <= n) :
#         if (n % i == 0 or n % (i + 2) == 0) :
#             return False
#         i = i + 6
#     return True
# inf = pow(10,20)
# mod = 10**9+7
#===============================================================================================
# code here ;))

import sys;
from math import ceil,log2;

INT_MAX = sys.maxsize;

# A utility function to get
# minimum of two numbers
def minVal(x, y) :
    return x if (x < y) else y;

# A utility function to get the
# middle index from corner indexes.
def getMid(s, e) :
    return s + (e - s) // 2;

""" A recursive function to get the  
minimum value in a given range  
of array indexes. The following  
are parameters for this function.  
  
    st --> Pointer to segment tree  
    index --> Index of current node in the  
        segment tree. Initially 0 is  
        passed as root is always at index 0  
    ss & se --> Starting and ending indexes  
                of the segment represented  
                by current node, i.e., st[index]  
    qs & qe --> Starting and ending indexes of query range """
def RMQUtil( st, ss, se, qs, qe, index) :

    # If segment of this node is a part
    # of given range, then return
    # the min of the segment
    if (qs <= ss and qe >= se) :
        return st[index];

    # If segment of this node
    # is outside the given range
    if (se < qs or ss > qe) :
        return INT_MAX;

    # If a part of this segment
    # overlaps with the given range
    mid = getMid(ss, se);
    return minVal(RMQUtil(st, ss, mid, qs,
                          qe, 2 * index + 1),
                  RMQUtil(st, mid + 1, se,
                          qs, qe, 2 * index + 2));

# Return minimum of elements in range
# from index qs (query start) to
# qe (query end). It mainly uses RMQUtil()
def RMQ( st, n, qs, qe) :

    # Check for erroneous input values
    if (qs < 0 or qe > n - 1 or qs > qe) :

        print("Invalid Input");
        return -1;

    return RMQUtil(st, 0, n - 1, qs, qe, 0);

# A recursive function that constructs
# Segment Tree for array[ss..se].
# si is index of current node in segment tree st
def constructSTUtil(arr, ss, se, st, si) :

    # If there is one element in array,
    # store it in current node of
    # segment tree and return
    if (ss == se) :

        st[si] = arr[ss];
        return arr[ss];

    # If there are more than one elements,
    # then recur for left and right subtrees
    # and store the minimum of two values in this node
    mid = getMid(ss, se);
    st[si] = minVal(constructSTUtil(arr, ss, mid,
                                    st, si * 2 + 1),
                    constructSTUtil(arr, mid + 1, se,
                                    st, si * 2 + 2));

    return st[si];

"""Function to construct segment tree  
from given array. This function allocates  
memory for segment tree and calls constructSTUtil() 
to fill the allocated memory """
def constructST( arr, n) :

    # Allocate memory for segment tree

    # Height of segment tree
    x = (int)(ceil(log2(n)));

    # Maximum size of segment tree
    max_size = 2 * (int)(2**x) - 1;

    st = [0] * (max_size);

    # Fill the allocated memory st
    constructSTUtil(arr, 0, n - 1, st, 0);

    # Return the constructed segment tree
    return st;


def solve(case):
    n = int(inp())
    a = lis()

    st = constructST(a,n)



    mxleft = [a[0]]*n
    curr = a[0]
    for i in range(1,n):
        curr = max(curr,a[i])
        mxleft[i] = curr

    mxright = [a[n-1]]*n
    curr = a[n-1]
    for i in range(n-2,-1,-1):
        curr = max(a[i],curr)
        mxright[i] = curr

    mx = {}
    for i in range(n-1,-1,-1):
        if(mxright[i] in mx):
            mx[mxright[i]].append(i)
        else:
            mx[mxright[i]] = [i]

    for i in mx:
        mx[i] = mx[i][::-1]

    for i in range(n-2):
        if(mxleft[i] not in mx):
            continue
        ans = mxleft[i]
        # print(i,mx[ans])
        # temp = mx[ans]
        lo = bl(mx[ans],i+2)
        if(lo < len(mx[ans]) and mx[ans][lo] > i+1 and RMQ(st,n,i+1,mx[ans][lo]-1) == ans):
            print('YES')
            print(i+1,mx[ans][lo] - 1 - i,n-mx[ans][lo])
            return
        if(lo<len(mx[ans])-1 and mx[ans][lo+1]>i+1 and RMQ(st,n,i+1,mx[ans][lo+1]-1) == ans):
            print('YES')
            print(i+1,mx[ans][lo+1]-1-i,n-mx[ans][lo+1])
            return
    print('NO')



# testcase(1)
testcase(int(inp()))