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.util.*;
import java.io.*;
import java.math.*;

public class eksperimen{
	static int cari_pref(int l , int r , int pref[] , final int target){
		while(l < r){
			int mid = (l + r) / 2 + (l + r) % 2;
			if (pref[mid] > target)
				r = mid - 1;
			else
				l = mid;
		}
		return l;
	}
	static int cari_suf(int l , int r , int suf[] , final int target){
		while(l < r){
			int mid = (l + r) / 2;
			if (suf[mid] > target)
				l = mid + 1;
			else
				r = mid;
		}
		return l;
	}
	public static void main(String args[]){
		FastScanner fs = new FastScanner();
		int T = fs.nextInt();
		for (int t = 1 ; t <= T ; ++t){
			//System.out.printf("test case : %d\n:" , t);
			int n = fs.nextInt() , maks = 0 , cnt = 1;
			int []arr = new int [n] , maks_arr = new int [3];
			for (int i = 0 ; i < n ; ++i){
				arr[i] = fs.nextInt();
				if (arr[i] > maks){
					maks = arr[i];
					cnt = 1;
					maks_arr[0] = i;
				}
				else if (arr[i] == maks && cnt < 3)
					maks_arr[cnt++] = i;
			}
			if (cnt == 3){
				System.out.printf("YES\n%d %d %d\n" , maks_arr[1] , 1 , n - maks_arr[1] - 1);
				continue;
			}
			if (arr[0] == maks || arr[n - 1] == maks){
				System.out.println("NO");
				continue;
			}
			int mid_l , mid_r , mini_mid_val = (int)1e9;
			if (cnt == 1)
				mid_l = mid_r = maks_arr[0];
			else{
				mid_l = maks_arr[0];
				mid_r = maks_arr[1];
			}
			for (int i = mid_l ; i <= mid_r ; ++i)
				mini_mid_val = Math.min(mini_mid_val , arr[i]);
			int []pref =  new int [n];
			int []suf = new int [n];
			int []mid_to_left = new int [n];
			int []mid_to_right = new int [n];
			pref[0] = arr[0];
			suf[n - 1] = arr[n - 1];
			mid_to_left[mid_l] = mini_mid_val;
			mid_to_right[mid_r] = mini_mid_val;
			for (int i = 1 ; i < mid_l ; ++i)
				pref[i] = Math.max(arr[i] , pref[i - 1]);
			for (int i = n - 2 ; i > mid_r ; --i)
				suf[i] = Math.max(suf[i + 1] , arr[i]);
			for (int i = mid_l - 1 ; i >= 0 ; --i)
				mid_to_left[i] = Math.min(mid_to_left[i + 1] , arr[i]);
			for (int i = mid_r + 1 ; i < n ; ++i)
				mid_to_right[i] = Math.min(mid_to_right[i - 1] , arr[i]);
			boolean sukses = false;
			for (int i = 0 ; i < n && !sukses ; ++i){
				int target = arr[i];
				if (target == maks)continue;
				if (arr[0] > target || arr[n - 1] > target)continue;
				int pref_maks = cari_pref(0 , mid_l - 1 , pref , target);
				int suf_maks = cari_suf(mid_r + 1 , n - 1 , suf , target);
				if (pref[pref_maks] != target || suf[suf_maks] != target)continue;
				//System.out.printf("target :%d\npref_maks : %d\nsuf_maks : %d\n\n" , target , pref_maks , suf_maks);
				int mid_val = Math.min(mini_mid_val , Math.min(mid_to_left[pref_maks + 1] , mid_to_right[suf_maks - 1]));
				if (mid_val < target)continue;
				if (mid_val == target){
					sukses = true;
					System.out.printf("YES\n%d %d %d\n" , pref_maks + 1 , suf_maks - pref_maks - 1 , n - suf_maks);
				}
				else if (pref_maks > 0 && pref[pref_maks - 1] == target && arr[pref_maks] == target){
					sukses = true;
					//System.out.println("ok1");
					System.out.printf("YES\n%d %d %d\n" , pref_maks , suf_maks - pref_maks , n - suf_maks);
				}
				else if (suf_maks < n - 1 && suf[suf_maks + 1] == target && arr[suf_maks] == target){
					sukses = true;
					//System.out.printf("ok2 %d\n" , mid_val);
					System.out.printf("YES\n%d %d %d\n" , pref_maks + 1 , suf_maks - pref_maks , n - suf_maks - 1);
				}
			}
			if (!sukses)
				System.out.println("NO");
		}
	}
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
}