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.*;

public class Problem686F {
	static int[][] st = new int[18][200005];

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int t = s.nextInt();
		for (int tt = 0; tt < t; tt++) {
			int n = s.nextInt();
			int[] arr = new int[n];
			int[] max_from_front = new int[n];
			int[] max_from_back = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = s.nextInt();
			}
			for (int i = 0; i < n; i++) {
				st[0][i] = arr[i];
			}
			for (int i = 1; i < 18; i++) {
				for (int j = 0; j + (1 << i) - 1 < n; j++) {
					st[i][j] = Math.min(st[i - 1][j], st[i - 1][j + (1 << (i - 1))]);
				}
			}
			max_from_front[0] = arr[0];
			max_from_back[n - 1] = arr[n - 1];
			for (int i = 1; i < n; i++) {
				max_from_front[i] = Math.max(max_from_front[i - 1], arr[i]);
			}
			for (int i = n - 2; i >= 0; i--) {
				max_from_back[i] = Math.max(max_from_back[i + 1], arr[i]);
			}
			int ret = -1;
			TreeSet<Integer> set = new TreeSet<>();
			HashMap<Integer, Integer> map = new HashMap<>();
			for (int i = 0; i < 20; i++) {
				set.add(1 << i);
				map.put(1 << i, i);
			}
			boolean passed=false;
			for (int i = 0; i < n-2; i++) {
				// System.out.println(bits);
				passed=false;
				int left_seg = max_from_front[i];
				//System.out.println(left_seg);
				int left=i+1;
				int right=n-2;
				while(left<=right) {
					int mid=(left+right)/2;
					int bits=map.get(set.floor(mid-i));
					int len=1<<bits;
					int mid_seg=Math.min(st[bits][i+1], st[bits][mid-len+1]);
					int right_seg=max_from_back[mid+1];
					if(mid_seg==right_seg&&mid_seg==left_seg) {
						passed=true;
						System.out.println("YES");
						System.out.println((i+1)+" "+(mid-i)+" "+(n-mid-1));
						break;
					}else if(mid_seg>left_seg||right_seg>left_seg) {
						left=mid+1;
					}else {
						right=mid-1;
					}
				}
				if(passed) {
					break;
				}
			}
			if(!passed) {
				System.out.println("NO");
			}
		}
	}

}