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.*;
public class f {
	static final FS sc = new FS();
	static final PrintWriter pw = new PrintWriter(System.out);
	
	static final int maxN = 200_000, maxM = 17;
	static final int[] bitIdx = new int[maxN + 1];
	
	static int n, N;
	static int[] arr;
	static int[][] minRmq, maxRmq;
	public static void main(String[] args) {
		int tempBit = 0;
		for(int i = 1; i <= maxN; ++i) {
			if(i == 1 << (tempBit + 1)) ++tempBit;
			bitIdx[i] = tempBit;
		}
		
		int t = sc.nextInt();
		scan : for(int tt = 1; tt <= t; ++tt) {
			n = sc.nextInt();
			arr = new int[n];
			TreeSet<Integer> set = new TreeSet<>();
			for(int i = 0; i < n; ++i) {
				arr[i] = sc.nextInt();
				set.add(arr[i]);
			}
			N = set.size();
			
			HashMap<Integer, Integer> map = new HashMap<>();
			for(int a : set) map.put(a, map.size());
			
			for(int i = 0; i < n; ++i) arr[i] = map.get(arr[i]);
			
			ArrayDeque<Integer>[] idxs = new ArrayDeque[N];
			for(int i = 0; i < N; ++i) idxs[i] = new ArrayDeque<>();
			
			for(int i = 0; i < n; ++i) idxs[arr[i]].add(i);
			
			minRmq = new int[maxM + 1][n];
			maxRmq = new int[maxM + 1][n];
			
			for(int i = 0; i < n; ++i) minRmq[0][i] = maxRmq[0][i] = arr[i];
			
			for(int k = 1; k <= maxM; ++k) {
				for(int i = 0; i < n; ++i) {
					if(i + (1 << k) - 1 < n) {
						minRmq[k][i] = min(minRmq[k - 1][i], minRmq[k - 1][i + (1 << (k - 1))]);
						maxRmq[k][i] = max(maxRmq[k - 1][i], maxRmq[k - 1][i + (1 << (k - 1))]);
					}
				}
			}
			
			int[] lastMaxPre = new int[N];
			Arrays.fill(lastMaxPre, -1);
			int currMax = -1;
			for(int i = 0; i < n; ++i) {
				currMax = max(currMax, arr[i]);
				lastMaxPre[currMax] = i;
			}
			
			int[] lastMaxSuff = new int[N];
			Arrays.fill(lastMaxSuff, n);
			currMax = -1;
			for(int i = n - 1; i >= 0; --i) {
				currMax = max(currMax, arr[i]);
				lastMaxSuff[currMax] = i;
			}
			
			for(int val = 0; val < N; ++val) {
				for(int mid : idxs[val]) {
					// get range of possible ls
					int l1 = 0;
					if(val > 0) l1 = lastMaxPre[val - 1] + 1;
					int r1 = min(lastMaxPre[val], mid - 1);
					
					int r2 = n - 1;
					if(val > 0) r2 = lastMaxSuff[val - 1] - 1;
					int l2 = max(lastMaxSuff[val], mid + 1);
					
					if(l1 <= r1 && lastMaxPre[val] != -1 && l2 <= r2 && lastMaxSuff[val] != n) {
						int L = r1, R = l2;
						if(getMax(0, L) == val && getMin(L + 1, R - 1) == val && getMax(R, n - 1) == val) {
							int x = L + 1, y = R - L - 1, z = n - R;
							pw.println("YES");
							pw.println(x + " " + y + " " + z);
							continue scan;
						}
					}
				}
			}
			
			pw.println("NO");
		}
		pw.flush();
	}
	static int getMin(int l, int r) {
		int k = bitIdx[r - l + 1];
		return min(minRmq[k][l], minRmq[k][r - (1 << k) + 1]);
	}
	static int getMax(int l, int r) {
		int k = bitIdx[r - l + 1];
		return max(maxRmq[k][l], maxRmq[k][r - (1 << k) + 1]);
	}
	static int min(int a, int b) {
		return a < b ? a : b;
	}
	static int max(int a, int b) {
		return a > b ? a : b;
	}
	static class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch(Exception e) {}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
}