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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class Solution{
	
	static int n;
	static int[] a;
	static HashMap<Integer, Integer> cnt, cntright;
	static TreeMap<Integer, Integer> map;
	static int[] ans;
	
	
    public static void main(String[] args) throws IOException {
    	
		
    	FastScanner fs = new FastScanner();
    	PrintWriter out = new PrintWriter(System.out);
    		
    	int tt = fs.nextInt();
    	outer:
    	while(tt-->0) {
    		ans = null;
    		
    		n = fs.nextInt();
    		a = new int[n];
    		cnt = new HashMap<>();
    		int maxel = 0;
    		
    		map = new TreeMap<>();
    		cntright = new HashMap<>();
    		
    		for(int i=0;i<n;i++) {
    			a[i] = fs.nextInt();
    			maxel = Math.max(a[i], maxel);
    			cnt.put(a[i], cnt.getOrDefault(a[i], 0)+1);
    			map.put(a[i], map.getOrDefault(a[i], 0)+1);
    		}
    		
    		if(cnt.get(maxel)>=3) {
    			out.println("YES");
    			ans = new int[3];
    			int j = 0;
    			for(int i=0;i<n;i++) {
    				if(a[i]==maxel) ans[j++] = i;
    				if(j==3) break;
    			}
    			ans[0] = ans[1];
    			ans[1] = 1;
    			ans[2] = n - ans[0] - 1;
    			out.println(ans[0]+" "+ans[1]+" "+ans[2]);
    			out.flush();
    			continue outer;
    		}
    		
    		
    		
    		
    		int max = 0;
    		
    		
    		int i = 0, j = n-1;
    		
    		for(i=0;i<n;i++) {
    			max = Math.max(max, a[i]);
    			remove(a[i]);
    			while(j>=0 && a[j]<=max) {
    				remove(a[j]);
    				cntright.put(a[j], cntright.getOrDefault(a[j], 0)+1);
    				j--;
    			}
    			if(i>j) break;
    			if(cntright.getOrDefault(max, 0)==0 || j==n-1) continue;
    			if(map.firstKey()==max) {
    				ans = new int[3];
    				ans[0] = i+1;
    				ans[2] = n-j-1;
    				ans[1] = n - ans[0] - ans[2];
    				break;
    			}
    			else if(map.firstKey()>max && j<n-1 && a[j+1]==max && cntright.get(max)>1) {
    				ans = new int[3];
    				ans[0] = i+1;
    				ans[2] = n-j-2;
    				ans[1] = n - ans[0] - ans[2];
    				break;
    			}
    		}
    		
    		
    		if(ans==null) {
    			out.println("NO");
    		}
    		else {
    			out.println("YES");
    			out.println(ans[0]+" "+ans[1]+" "+ans[2]);
    		}
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    	}
    	
    	out.close();
    	
    }
    
    static void remove(int x) {
    	map.put(x, map.getOrDefault(x, 0) - 1);
    	if(map.get(x)==0) map.remove(x);
    }
    
    
    
    
    static final Random random=new Random();
    
    static <T> void shuffle(T[] arr) {
    	int n = arr.length;
    	for(int i=0;i<n;i++	) {
    		int k = random.nextInt(n);
    		T temp = arr[k]; arr[k] = arr[i]; arr[i] = temp;
    	}
    }
    
    	
    static void ruffleSort(int[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); int temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
    
    static void ruffleSort(long[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); long temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
   
  
    
    static void reverse(int[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		int temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    static void reverse(long[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		long temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    
    static <T> void reverse(T[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++) {
    		T temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    	
    	
    static class FastScanner{
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringTokenizer st = new StringTokenizer("");
     
    	public String next(){
    		while(!st.hasMoreElements()){
    			try{
    				st = new StringTokenizer(br.readLine());
    			} catch(IOException e){
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}
    		
    	public String nextLine() throws IOException {
    		return br.readLine();
    	}
    		
    	public int nextInt(){
    		return Integer.parseInt(next());
    	}
     
    	public int[] readArray(int n){
    		int[] a = new int[n];
    		for(int i=0;i<n;i++)
    			a[i] = nextInt();
    		return a;
    	}
    		
    	public long nextLong() {
    		return Long.parseLong(next());
    	}
    		
    	public char nextChar() {
    		return next().toCharArray()[0];
    	}
    }
   	
}