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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class problemF {
    private static void solve() throws Exception {
        int n = fs.nextInt();
        int[] a = fs.readArray(n);

        int[] pre = new int[n];
        for (int i = 0 ; i < n ; i ++ ) pre[i] = i == 0 ? a[0] : Math.max(a[i], pre[i-1]);

        int[] post = new int[n];
        for (int i = n-1; i >= 0 ; i --) post[i] = i == n-1 ? a[i] : Math.max(a[i], post[i+1]);

        HashMap<Integer, ArrayList<Integer>> indices = new HashMap<Integer, ArrayList<Integer>>();
        for (int i = 0 ; i < n ; i ++ ) {
            if (!indices.containsKey(a[i])) {
                indices.put(a[i], new ArrayList<>());
            }
            indices.get(a[i]).add(i);
        }

        SegmentTree st = new SegmentTree(a);
        // [ 1 ... s] * * * [e ... n]
        // [ 1 ... e] * * * [s ... n]
        for (int s = 0; s < n ; s++) {
            int val = a[s];
            s = lastIndex(val, pre, n);
            int e = firstIndex(val, post, n);

            if (e == n) continue;

            if (e-s-1 > 0) {
                int mn = st.min(s+1, e);
                if (mn == val) {
                    out.println("YES"); // x+y == e
                    out.println(s+1 + " " + (e-s-1) + " " + (n-e));
                    return;
                }
            } else if (s-e-1 > 0) {
                if (indices.get(val).size() >= 3) {
                    int ind = indices.get(val).get(1);
                    out.println("YES");
                    out.println(ind + " 1 " + (n-ind-1));
                    return;
                }
            }
            if (s > 0 && a[s] == val && pre[s-1] == val) {
                int mn = st.min(s,e);
                if (mn == val) {
                    out.println("YES");
                    out.println(s + " " + (e-s) + " " + (n-e));
                    return;
                }
            }
            if (e < n-1 && a[e] == val && post[e+1] == val) {
                int mn = st.min(s+1, e+1);
                if (mn == val) {
                    out.println("YES");
                    out.println((s+1 + " " + (e-s) + " " + (n-e-1)));
                    return;
                }
            }
        }
        out.println("NO");
    }

    public static class SegmentTree {
        int n;
        int[] tree;

        SegmentTree(int[] a) {
            this.n = a.length;
            tree = new int[2*n];
            for (int i = 0 ; i < a.length; i ++) {
                tree[n+i] = a[i];
            }
            for (int i = n-1; i > 0 ; i -- ) {
                tree[i] = Math.min(tree[i<<1], tree[i<<1^1]);
            }
        }

        void setValueAtIndex(int index, int value) {
            int p = n + index;
            tree[p] = value;
            for (p = p >> 1; p > 0; p >>= 1) {
                tree[p] = Math.min(tree[p<<1], tree[p<<1^1]);
            }
        }

        int min(int leftInclusive, int rightExclusive) {
            int ans = Integer.MAX_VALUE;
            for (int l = leftInclusive+n, r = rightExclusive+n; l < r; l >>= 1, r >>= 1) {
                if ((l&1) == 1) ans = Math.min(ans, tree[l++]);
                if ((r&1) == 1) ans = Math.min(ans, tree[--r]);
            }
            return ans;
        }
    }

    static int firstIndex(int x, int[] a, int n) {
        int low = 0;
        int high = n-1;
        int ans = n;
        while (low <= high) {
            int mid = (low+high)/2;
            if (a[mid] > x) {
                low = mid+1;
            } else if (a[mid] == x) {
                ans = Math.min(ans, mid);
                high = mid-1;
            } else {
                high = mid-1;
            }
        }
        return ans;
    }

    static int lastIndex(int x, int[] a, int n) {
        int low = 0;
        int high = n-1;
        int ans = 0;
        while (low <= high) {
            int mid = (low+high)/2;
            if (a[mid] <= x) {
                ans = Math.max(ans, mid);
                low = mid+1;
            } else {
                high = mid-1;
            }
        }
        return ans;
    }

    private static void init() throws Exception {
        
    }

    private static FastScanner fs = new FastScanner();
    private static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) throws Exception {
        int T = 1;
        init();
        T = fs.nextInt();
        for (int t = 0; t < T; t++) {
            solve();
        }
        out.close();
    }

    static void debug(Object... O) {
        System.err.print("DEBUG ");
        System.err.println(Arrays.deepToString(O));
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

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

        int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) a[i] = nextInt();
            return a;
        }

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

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

        String nextString() {
            return next();
        }
    }
}