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

Solution:
import java.io.*;
import java.util.*;

/**
    @author KhanhNguyenn
 */
 
public class A{
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
    // main solver
    static class Task{
        public void solve(InputReader in, PrintWriter out) {
            int t= in.nextInt();
            while(t-->0){
                int n= in.nextInt();
                int[] arr= new int[n];
                for(int i=0;i<n;i++) {
                    arr[i]= in.nextInt();
                }
                RMQ rmq= new RMQ(arr);
                int[] pre= new int[n];
                pre[0]= arr[0];
                for(int i=1;i<n;i++) {
                    pre[i]= Math.max(pre[i-1],arr[i]);
                }
                int[] suf= new int[n];
                suf[n-1]= arr[n-1];
                for(int i=n-2;i>=0;i--){
                    suf[i]= Math.max(suf[i+1],arr[i]);
                }

                int[] ans= new int[2];
                boolean ok=false;
                for(int i=2;i<n;i++) {
                    int val= suf[i];
                    int l=0, r=i-1;
                    while(r-l>1) {
                        int mid= (l+r)/2;
                        if(pre[mid]<=val) l= mid;
                        else r=mid-1;
                    }
                    if(!ok && valid(rmq,pre,suf,l,i)){
                        ok=true;
                        ans= new int[]{l,i};
                    }
                    if(!ok && valid(rmq,pre,suf,l-1,i)){
                        ok=true;
                        ans= new int[]{l-1,i};
                    }
                    if(!ok && valid(rmq,pre,suf,r,i)){
                        ok=true;
                        ans= new int[]{r,i};
                    }
                    if(!ok && valid(rmq,pre,suf,r-1,i)){
                        ok=true;
                        ans= new int[]{r-1,i};
                    }
                    if(ok) break;
                }
                if(!ok){
                    out.println("NO");
                }
                else {
                    out.println("YES");
                    out.println(ans[0]+1+" "+(ans[1]-ans[0]-1)+" "+(n-ans[1]));
                }
                
            }
        }

        public boolean valid(RMQ rmq, int[]pre, int[] suf, int l, int r) {
            int n= pre.length;
            if (l<0 || r>=n) return false;
            if (r-l<=1) return false;
            if (pre[l]!=suf[r]) return false;
            if (rmq.query(l+1,r-1)!=pre[l]) return false;
            return true;
        }
    }
    static class RMQ {
        int[][] st;
        int[] arr;
        int[] log;
        int n,k;
    
        public RMQ(int[] arr) {
            this.arr= arr;
            this.n= this.arr.length;
            this.k= (int)(Math.floor(Math.log(n)/Math.log(2))) +1;
            this.st= new int[n][k+1];
    
            //build sparse table: st[i][j] query range from arr[i] with the length og 2^j
            for(int i=0;i<n;i++){ st[i][0]=arr[i];}
            for(int j=1;j<=k;j++) {
                for(int i=0;i+ (1<<j) <=n ;i++) {
                    st[i][j]= Math.min(st[i][j-1], st[i+(1<<(j-1))][j-1]);
                }
            }
    
            //build log array
            this.log= new int[n+1];
            log[1]=0;
            for(int i=2;i<=n;i++) {
                log[i]= log[i/2]+1;
            }
        }
    
        public int query(int l, int r) {
            int j= this.log[r-l+1];
            return Math.min(st[l][j], st[r-(1<<j)+1][j]);
        }
    }
    
    static class Pair implements Comparable<Pair>{
        public int x, y;
        public Pair(int x, int y){
            this.x = x;
            this.y = y;
        }
 
        @Override
        public int compareTo(Pair o) {
            if (this.x > o.x){
                return 1;
            }
            else if (this.x < o.x){
                return -1;
            }
            else{
                return Integer.compare(this.y, o.y);
            }
        }
    }
    // fast input reader class;
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
 
        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }
 
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                String line = null;
                try {
                    line = br.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null) {
                    return null;
                }
                st = new StringTokenizer(line);
            }
            return st.nextToken();
        }
 
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public double nextDouble(){
            return Double.parseDouble(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    }
}