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 static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Task6 {

	static int updateMin(int left, int right, int min) {
		for(int i = left; i < right; i++) {
			if (arr[i] < min) min = arr[i];
		}
		
		return min;
	}
		
	static void findAnsw(int left, int right, int val) {
		answ = "YES";
		for(int i = left + 1; i < arr.length; i++) {
			if (arr[i] == val) {
				x = i - 1;
				break;
			}
		}
		y = 1;
		z = arr.length - 1 - x - y; //as arr = new int[n+1];
	}
	
	static int[] arr;
	static String  answ;
	static int x;
	static int y;
	static int z;
	
	static void solve() throws Exception{
		answ = "NO";
		x = -1;
		y = -1;
		z = -1;
		int n = scanInt();
		arr = new int[n+1];
		for(int i = 1; i < n+1; i++) {
			arr[i] = scanInt();
		}
		//construct prefix && suffix;
		int[] prefix = new int[n+1];
		prefix[1] = arr[1];
		for(int i = 2; i < n+1; i++) {
			prefix[i] = Math.max(prefix[i-1], arr[i]);
		}
		int[] suffix = new int[n+1];
		suffix[n] = arr[n];
		for(int i = n-1; i > 0; i--) {
			suffix[i] = Math.max(suffix[i+1], arr[i]);
		}
		
		//find max el;
		int max = 0;
		int left = 0;
		int right = 0;
		int cnt = 1;
		for (int i = 1; i < n+1; i++) {
			if (arr[i] == max) {
				cnt++;
				right = i;
			}
			if (arr[i] > max) {
				cnt = 1;
				max = arr[i];
				left = i;
				right = i;
			}
		}
			
		//first;
		int minLeft, minRight;
		if (cnt >= 3) {
			findAnsw(left, right, max);
		}else {
			int min = updateMin(left+1, right, max);
			while(left > 1 && right < arr.length - 1 && answ.equals("NO")) {
				int leftMax = prefix[left-1];
				int rightMax = suffix[right+1];
				if (leftMax == min && min == rightMax) {
					answ = "YES";
					x = left - 1;
					y = right - x;
					z = arr.length - 1 - x - y;
				}else{
					if (left == 2 && right == arr.length - 2) break;
					//find minLeft;
					if (left == 2) {
						minLeft = 0;
					}else {
						int lMin = Math.min(min, arr[left - 1]);
						int lPrefix = prefix[left - 2];
						int lSuffix = suffix[right + 1];
						minLeft = Math.min(lMin, Math.min(lPrefix, lSuffix));
					}
					//find minRight;
					if (right == arr.length - 2) {
						minRight = 0;
					}else {
						int rMin = Math.min(min, arr[right + 1]);
						int rPrefix = prefix[left - 1];
						int rSuffix = suffix[right + 2];
						minRight = Math.min(rMin, Math.min(rPrefix, rSuffix));
					}
					//update range;
					if(minLeft >= minRight) {
						left--;
						min = Math.min(min, arr[left]);
						leftMax = prefix[left-1];
					}else {
						right++;
						min = Math.min(min, arr[right]);
						leftMax = prefix[right+1];
					}
				}
			}
		}
		
		out.println(answ);
		if (answ.equals("YES")) {
			out.println(x + " " + y + " " + z);
		}
	}
		
	static int scanInt() throws IOException {
		return parseInt(scanString());
	}

	static long scanLong() throws IOException {
		return parseLong(scanString());
	}

	static String scanString() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	static void printCase() {
		out.print("Case #" + test + ": ");
	}

	static void printlnCase() {
		out.println("Case #" + test + ":");
	}

	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;
	static int test;
	
	
	public static void main(String[] args) {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			int tests = scanInt();
			for(test = 1; test <= tests; test++) {
				solve();
			}
			in.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			exit(1);
		}
	}
}