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.*;
import java.math.*;
 
public class Main {
    static PrintWriter out;
    static Reader in;
    public static void main(String[] args) throws IOException {
        //in = new Reader(new FileInputStream(args[0])); // for test.
        input_output();
        Main solver = new Main();
        solver.solve();
        out.close(); // remove when testing.
        out.flush(); // remove when testing.
    }
 
    static int INF = (int)2e9;
    static int maxn = (int)2e5+5;
    static int mod = 998244353;
    static int n, m, q, t, k;

    void solve() throws IOException{
    	t = in.nextInt();

    	loop:while (t --> 0) {
    		n = in.nextInt();

    		int[] arr = new int[n];
    		for (int i = 0; i < n; i++) arr[i] = in.nextInt();

    		int[] sL = new int[n],
    			  sR = new int[n];

    		Map<Integer, Integer> nextL = new HashMap<>(),
    							  nextR = new HashMap<>(),
    							  cnt = new HashMap<>();

    		for (int i = 0; i < n; i++) {
    			cnt.put(arr[i], cnt.getOrDefault(arr[i], 0)+1);
    		}

    		boolean[] valid = new boolean[n+1];
    		for (int i = 0; i < n; i++) valid[i] = true;

    		int[] pre = new int[n],
    			  suf = new int[n];
    		pre[0] = arr[0];
    		suf[n-1] = arr[n-1];
    		for (int i = 1; i < n; i++) pre[i] = Math.max(pre[i-1], arr[i]);
    		for (int i = n-2; i >= 0; i--) suf[i] = Math.max(suf[i+1], arr[i]);


    		List<Node> list = new ArrayList<>();
    		for (int i = 0; i < n; i++) list.add(new Node(arr[i], i));
    		Collections.sort(list);

    		TreeSet<Integer> set = new TreeSet<>();
    		set.add(-1); set.add(n);
    		for (int i = 0; i < n; i++) {
    			Node node = list.get(i);
    			sL[node.id] = set.lower(node.id);
    			sR[node.id] = set.higher(node.id);
    			set.add(node.id);
    		}


    		int[] left = new int[n],
    			  right = new int[n];
    		for (int i = 0; i < n; i++) {
    			if (cnt.get(arr[i]) < 3) {
    				valid[i] = false;
    				continue;
    			}

    			if (nextL.get(arr[i]) == null) {
    				valid[i] = false;
    				nextL.put(arr[i], i+1);
    			} else {
    				int to = nextL.get(arr[i]);
    				if (to <= sL[i]) {
    					left[i] = sL[i]+1;
    					nextL.put(arr[i], sL[i]+1);
    				} else {
    					left[i] = to;
    				}
    			}
    		}

    		for (int i = n-1; i >= 0; i--) {
    			if (!valid[i]) continue;

    			if (nextR.get(arr[i]) == null) {
    				nextR.put(arr[i], i-1);
    				valid[i] = false;
    			} else {
    				int to = nextR.get(arr[i]);
    				if (to >= sR[i]) {
    					right[i] = sR[i]-1;
    					nextR.put(arr[i], sR[i]-1);
    				} else {
    					right[i] = to;
    				}
    			}

    			if (valid[i]) {
    				if (pre[left[i]-1] == suf[right[i]+1] && pre[left[i]-1] == arr[i]) {
    					int mid = right[i]-left[i]+1;
    					out.println("YES");
    					out.println(left[i]+" "+mid+" "+(n-1-(right[i]+1)+1));
    					continue loop;
    				}
    			}
    		}
    		out.println("NO");

    	}

    }

    //<>

    static class Node implements Comparable<Node> {
    	int val, id;

    	Node (int val, int id) {
    		this.val = val;
    		this.id = id;
    	}

    	public int compareTo(Node o) {
    		if (this.val != o.val) return this.val - o.val;
    		return this.id - o.id;
    	}
    }

    static class Reader {
 
        private InputStream mIs;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
    
        public Reader() {
            this(System.in);
        }
    
        public Reader(InputStream is) {
            mIs = is;
        }
    
        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
    
        }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = mIs.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }
    
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
    
        public String next() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
    
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
    
        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
    
        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
    
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
    
        public boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
 
    }
    static void input_output() throws IOException {
        File f = new File("in.txt");
        if(f.exists() && !f.isDirectory()) { 
            in = new Reader(new FileInputStream("in.txt"));
        } else in = new Reader();
        f = new File("out.txt");
        if(f.exists() && !f.isDirectory()) {
            out = new PrintWriter(new File("out.txt"));
        } else out = new PrintWriter(System.out);
    }
}