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


public class Main {
    //static final long MOD = 1000000007L;
    //static final long MOD2 = 1000000009L;
    static final long MOD = 998244353L;
    //static final long INF = 500000000000L;
    static final int INF = 500000000;
    
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter pw = new PrintWriter(System.out);
        
        
        int Q = sc.ni();
        for (int q = 0; q < Q; q++) {
        	int N = sc.ni();
        	int[] nums = new int[N];
        	HashMap<Integer,TreeSet<Integer>> hm = new HashMap<Integer,TreeSet<Integer>>();
        	int top = 0;
        	for (int i = 0; i < N; i++) {
        		nums[i] = sc.ni();
        		top = Math.max(top, nums[i]);
        		if (!hm.containsKey(nums[i]))
        			hm.put(nums[i], new TreeSet<Integer>());
        		hm.get(nums[i]).add(i);
        	}
        	SegmentTree st = new SegmentTree(nums);
        	int[] ans = new int[3];
        	loop:
        	for (int val: hm.keySet()) {
        		TreeSet<Integer> indices = hm.get(val);
        		if (indices.size() < 3) continue;
        		int first = indices.first();
        		int last = indices.last();
        		int L = N;
        		int R = -1;
        		if (val < top) {
        			if (first > 0 && st.max(0,first-1) > val) {
        				L = -1;
        			} else {
            			//binarysearch for L
            			int lo = first;
            			int hi = N-1;
            			while (lo < hi) {
            				int med = (lo+hi+1)/2;
            				if (st.max(0,med)==val)
            					lo = med;
            				else
            					hi = med-1;
            			}
            			L = lo;
        			}
        			if (last < N-1 && st.max(last+1,N-1) > val) {
        				R = N;
        			} else {
            			//binarysearch for R
            			int lo = 0;
            			int hi = last;
            			while (lo < hi) {
            				int med = (lo+hi)/2;
            				if (st.max(med,N-1)==val)
            					hi = med;
            				else
            					lo = med+1;
            			}
            			R = lo;
        			}
        		}
        		
        		//pw.println(val + " " + L + " " + R);
        		
        		if (L >= 0 && R < N) {
        			if (L > R) {
        				int second = indices.higher(first);
        				ans = new int[] {second,1,N-1-second};
        				break loop;
        			} else if (st.min(L+1,R-1) == val) {
        				ans = new int[] {L+1,R-L-1,N-R};
        				break loop;
        			} else if (st.min(L+1, R-1) > val) {
        				int onLeft = indices.floor(L);
        				int onRight = indices.ceiling(R);
        				if (onLeft != first && st.min(onLeft, L)==val) {
        					ans = new int[] {onLeft,R-onLeft,N-R};
            				break loop;
        				} else if (onRight != last && st.min(R, onRight)==val) {
        					ans = new int[] {L+1,onRight-L,N-1-onRight};
            				break loop;
        				}
        			}
        		}
        	}
        	if (ans[0] > 0) {
        		pw.println("YES");
        		pw.println(ans[0] + " " + ans[1] + " " + ans[2]);
        	} else {
        		pw.println("NO");
        	}
        }
        pw.close();
    }
    
    static class SegmentTree {
    	public int[] min;
    	public int[] max;
    	public int NONE;
    	public int N;

    	//Zero initialization
    	public SegmentTree(int[] arr) {
    		N = arr.length;
    		min = new int[2*N+1];
    		max = new int[2*N+1];
    		NONE = Integer.MAX_VALUE;
    		build(0,0,N-1,arr);
    	}

    	public int min(int i, int j) {
    		return min(0,0,N-1,i,j);
    	}
    	
    	public int max(int i, int j) {
    		return max(0,0,N-1,i,j);
    	}

    	private int min(int t, int lo, int hi, int i, int j) {
    		// min for arr[i..j]
    		if (lo > j || hi < i)
    			return NONE;
    		if (i <= lo && j >= hi)
    			return min[t];

    		int mid = (lo+hi)/2;
    		if (i > mid)
    			return min(t+2*(mid-lo+1),mid+1,hi,i,j);
    		else if (j <= mid)
    			return min(t+1,lo,mid,i,j);

    		// merge min results
    		return Math.min(min(t+1, lo, mid, i, mid), min(t+2*(mid-lo+1),mid+1,hi,mid+1,j));
    	}
    	
    	private int max(int t, int lo, int hi, int i, int j) {
    		// max for arr[i..j]
    		if (lo > j || hi < i)
    			return NONE;
    		if (i <= lo && j >= hi)
    			return max[t];

    		int mid = (lo+hi)/2;
    		if (i > mid)
    			return max(t+2*(mid-lo+1),mid+1,hi,i,j);
    		else if (j <= mid)
    			return max(t+1,lo,mid,i,j);

    		// merge max results
    		return Math.max(max(t+1, lo, mid, i, mid), max(t+2*(mid-lo+1),mid+1,hi,mid+1,j));
    	}
    	
    	private void build(int t, int lo, int hi, int[] arr) {
    		if (lo==hi) {
    			min[t] = arr[lo];
    			max[t] = arr[lo];
    			return;
    		}
    		int mid = (lo+hi)/2;
    		build(t+1,lo,mid,arr);
    		build(t+2*(mid-lo+1),mid+1,hi,arr);
    		min[t] = Math.min(min[t+1],min[t+2*(mid-lo+1)]);
    		max[t] = Math.max(max[t+1],max[t+2*(mid-lo+1)]);
    	}
    }
    
    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int ni() {
            return Integer.parseInt(next());
        }
 
        long nl() {
            return Long.parseLong(next());
        }
 
        double nd() {
            return Double.parseDouble(next());
        }
 
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}