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

public class F_1454 {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		
		int t = sc.nextInt();
		while(t-->0) {
			int n = sc.nextInt();
			int N = 1;
			while(N < n)
				N <<= 1;
			
			int[] array = new int[N + 1];
			int cnt = 0;
			TreeMap<Integer, Integer> map = new TreeMap<>();
			for(int i = 1; i <= n; i++) {
				array[i] = sc.nextInt();
				if(!map.containsKey(array[i]))
					map.put(array[i], cnt++);
			}
			
			ArrayList<Integer>[] index = new ArrayList[cnt];
			for(int i = 0; i < cnt; i++)
				index[i] = new ArrayList<>();
			for(int i = 1; i <= n; i++)
				index[map.get(array[i])].add(i);
			
			MaxSegmentTree segMax = new MaxSegmentTree(array);
			MinSegmentTree segMin = new MinSegmentTree(array);
			
			boolean flag = false;
			String ans = "";
			for(int i = 1; i <= n - 2; i++) {
				int x = segMax.query(1, i);
				int j = Collections.binarySearch(index[map.get(x)], i + 1);
				if(j < 0)
					j = -(j + 1);
				if(j == index[map.get(x)].size())
					continue;
				j = index[map.get(x)].get(j);
				if(j == n)
					continue;
				if(segMin.query(i + 1, j) != x)
					continue;
				int start = j, end = n - 1;
				while(start < end) {
					int mid = (start + end + 1) >> 1;
					if(segMin.query(i + 1, mid) == x)
						start = mid;
					else
						end = mid - 1;
				}
				int k = start;
				
				start = j;
				end = k;
				
				while(start <= end) {
					int mid = (start + end) >> 1;
					int y = segMax.query(mid + 1, n);
					if(y == x) {
						start = end = mid;
						break;
					} else if(y < x) {
						end = mid - 1;
					} else {
						start = mid + 1;
					}
				}
				
				if(start == end) {
					flag = true;
					ans = i + " " + (start - i) + " " + (n - start);
				}
			}
			
			if(flag) {
				System.out.println("YES");
				System.out.println(ans);
			} else {
				System.out.println("NO");
			}
		}
		
		pw.flush();
	}
	
	public static class MaxSegmentTree {
		
		int INF = (int)1e9+7;
		int N;
		int[] in, sTree;
		
		public MaxSegmentTree(int[] array) {
			N = array.length - 1;
			in = array;
			sTree = new int[N<<1];
			build(1, 1, N);
		}
		
		public void build(int node, int b, int e) {
			if(b == e) {
				sTree[node] = in[b];
				return;
			}
			
			int left = node<<1, right = node<<1|1;
			int mid = (b + e)>>1;
			build(left, b, mid);
			build(right, mid + 1, e);
			sTree[node] = Math.max(sTree[left], sTree[right]);
		}
		
		public int query(int l, int r) {
			return query(1, 1, N, l, r);
		}
		
		public int query(int node, int b, int e, int l, int r) {
			if(l > e || r < b)
				return -INF;
			if(b >= l && e <= r)
				return sTree[node];
			
			int left = node<<1, right = node<<1|1;
			int mid = (b + e)>>1;
			return Math.max(query(left, b, mid, l, r), query(right, mid + 1, e, l, r));
		}
	}
	
	public static class MinSegmentTree {
		
		int INF = (int)1e9+7;
		int N;
		int[] in, sTree;
		
		public MinSegmentTree(int[] array) {
			N = array.length - 1;
			in = array;
			sTree = new int[N<<1];
			build(1, 1, N);
		}
		
		public void build(int node, int b, int e) {
			if(b == e) {
				sTree[node] = in[b];
				return;
			}
			
			int left = node<<1, right = node<<1|1;
			int mid = (b + e)>>1;
			build(left, b, mid);
			build(right, mid + 1, e);
			sTree[node] = Math.min(sTree[left], sTree[right]);
		}
		
		public int query(int l, int r) {
			return query(1, 1, N, l, r);
		}
		
		public int query(int node, int b, int e, int l, int r) {
			if(l > e || r < b)
				return INF;
			if(b >= l && e <= r)
				return sTree[node];
			
			int left = node<<1, right = node<<1|1;
			int mid = (b + e)>>1;
			return Math.min(query(left, b, mid, l, r), query(right, mid + 1, e, l, r));
		}
	}
	
	public static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] array = new int[n];
			for (int i = 0; i < n; i++)
				array[i] = nextInt();
			return array;
		}

		public Integer[] nextIntegerArray(int n) throws IOException {
			Integer[] array = new Integer[n];
			for (int i = 0; i < n; i++)
				array[i] = new Integer(nextInt());
			return array;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++)
				array[i] = nextLong();
			return array;
		}

		public double[] nextDoubleArray(int n) throws IOException {
			double[] array = new double[n];
			for (int i = 0; i < n; i++)
				array[i] = nextDouble();
			return array;
		}

		public static int[] shuffle(int[] a) {
			int n = a.length;
			Random rand = new Random();
			for (int i = 0; i < n; i++) {
				int tmpIdx = rand.nextInt(n);
				int tmp = a[i];
				a[i] = a[tmpIdx];
				a[tmpIdx] = tmp;
			}
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}
