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

public class Coding {

    private static BufferedReader bi = new BufferedReader(new InputStreamReader(System.in));
    private static BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));
    /*static int[] sum = new int[4*200000 + 11];
    static int[] updateLeft = new int[4*200000 + 11];
    static int[] maxm = new int[4*200000 + 11];*/
    static int[] minm = new int[4 * 200000 + 11];

    public static void main(String[] args) {
        try {
            run();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    public static void run() throws Exception {
        InputModule inp = new InputModule();
        OutputModule out = new OutputModule();
        int t = inp.cinInt();
        while (t > 0) {
            int n = inp.cinInt();
            int[] ar = inp.cinIntArray(n);
            buildTree(0, 0, n - 1, ar);
            int[] rmax = new int[n];
            rmax[n - 1] = ar[n - 1];
            for (int i = n - 2; i >= 0; --i) rmax[i] = Math.max(rmax[i + 1], ar[i]);
            int maxYet = 0;
            boolean found = false;
            int x = 0, y = 0, z = 0;
            for (int i = 0; i < n; ++i) {
                maxYet = Math.max(maxYet, ar[i]);
                int lo = i + 2;
                int hi = n - 1;
                //System.out.println("processing for " + i);
                while (lo <= hi) {
                    int mi = (lo + hi) / 2;
                    if (rmax[mi] > maxYet) {
                        lo = mi + 1;
                    } else if (rmax[mi] < maxYet) {
                        hi = mi - 1;
                    } else {
                        //System.out.println("found equal right at " + mi);
                        int value = query(0, 0, n - 1, i + 1, mi - 1);
                       // System.out.println("Middle value is " + value);
                        if (value < maxYet) {
                            hi = mi - 1;
                        } else if (value > maxYet) {
                            lo = mi + 1;
                        } else {
                            found = true;
                            x = i + 1;
                            y = mi - i - 1;
                            z = n - x - y;
                            break;
                        }
                    }
                }
                if (found) break;
            }
            if (found) {
                out.printString("YES");
                writer.append(x + " " + y + " " + z + "\n");
                writer.flush();
            } else {
                out.printString("NO");
            }
            t--;
        }
    }


    private static void buildTree(int idx, int l, int r, int[] ar) {
        if (l == r) {
            minm[idx] = ar[l];
        } else {
            int mi = (l + r) / 2;
            buildTree(2 * idx + 1, l, mi, ar);
            buildTree(2 * idx + 2, mi + 1, r, ar);
            minm[idx] = Math.min(minm[2 * idx + 1], minm[2 * idx + 2]);
        }
    }

    private static int query(int idx, int l, int r, int ql, int qr) {
        if (ql > r || qr < l) {
            return Integer.MAX_VALUE;
        } else if (ql <= l && qr >= r) {
            return minm[idx];
        } else {
            int mid = (l + r) / 2;
            return Math.min(query(2 * idx + 1, l, mid, ql, qr), query(2 * idx + 2, mid + 1, r, ql, qr));
        }
    }

    private static class InputModule {
        private int cinInt() throws Exception {
            return Integer.parseInt(bi.readLine().split(" ")[0].trim());
        }

        private long cinLong() throws Exception {
            return Long.parseLong(bi.readLine().split(" ")[0].trim());
        }

        private Double cinDouble() throws Exception {
            return Double.parseDouble(bi.readLine().split(" ")[0].trim());
        }

        private String cinString() throws Exception {
            return bi.readLine();
        }

        private int[] cinIntArray(int n) throws Exception {
            String input = bi.readLine();
            String[] values = input.split(" ");
            int[] ar = new int[n];
            for (int i = 0; i < n; ++i) {
                ar[i] = Integer.parseInt(values[i]);
            }
            return ar;
        }

        private int[] cinIntArray() throws Exception {
            String input = bi.readLine();
            String[] values = input.split(" ");
            int[] ar = new int[values.length];
            for (int i = 0; i < values.length; ++i) {
                ar[i] = Integer.parseInt(values[i]);
            }
            return ar;
        }

        private long[] cinLongArray(int n) throws Exception {
            String input = bi.readLine();
            String[] values = input.split(" ");
            long[] ar = new long[n];
            for (int i = 0; i < n; ++i) {
                ar[i] = Long.parseLong(values[i]);
            }
            return ar;
        }

        private String[] cinStringArray(int n) throws Exception {
            return bi.readLine().split(" ");
        }
    }

    private static class OutputModule {
        private void printInt(int ans) throws Exception {
            writer.append(ans + "\n");
            writer.flush();
        }

        private void printLong(long ans) throws Exception {
            writer.append(ans + "\n");
            writer.flush();
        }

        private void printDouble(Double ans) throws Exception {
            writer.append(String.format("%.10f", ans));
            writer.append("\n");
            writer.flush();
        }

        private void printString(String ans) throws Exception {
            writer.append(ans + "\n");
            writer.flush();
        }

        private void printIntArray(int[] ans) throws Exception {
            for (int i = 0; i < ans.length; ++i) {
                writer.append(ans[i] + " ");
            }
            writer.append("\n");
            writer.flush();
        }

        private void printLongArray(long[] ans) throws Exception {
            for (int i = 0; i < ans.length; ++i) {
                writer.append(ans[i] + " ");
            }
            writer.append("\n");
            writer.flush();
        }

        private void printIntMatrix(int[][] mat, int n, int m) throws Exception {
            for (int i = 0; i < n; ++i) {
                for (int j = 0; j < m; ++j) {
                    writer.append(mat[i][j] + " ");
                }
                writer.append("\n");
            }
            writer.flush();
        }

        private void printLongMatrix(long[][] mat, int n, int m) throws Exception {
            for (int i = 0; i < n; ++i) {
                for (int j = 0; j < m; ++j) {
                    writer.append(mat[i][j] + " ");
                }
                writer.append("\n");
            }
            writer.flush();
        }

        private void printPoint(Point p) throws Exception {
            writer.append(p.x + " " + p.y + "\n");
            writer.flush();
        }

        private void printPoints(List<Point> p) throws Exception {
            for (Point pp : p) {
                writer.append(pp.x + " " + pp.y + "\n");
            }
            writer.flush();
        }
    }
}