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.*;
 
public class Main extends PrintWriter {
    
   
    private void solve() {
        int t = sc.nextInt();
        for(int tt = 1; tt <= t; tt++) {
            int n = sc.nextInt();
            a = new int[n];
            for(int i = 0; i < n; i++) a[i] = sc.nextInt();
            max = new int[4*n];
            min = new int[4*n];
            build(0, n-1, 1);
            
            int[] max_suffix = new int[n];
            int best = 0;
            for(int i = n-1; i >= 0; i--) {
                best = Math.max(best, a[i]);
                max_suffix[i] = best;
            }
            
            boolean found = false;
            for(int i = 0; i < n-2; i++) {
                int m = query_max(0, n-1, 1, 0, i);
                int l = i+1; int r = n-1;
                while(l < r-1) {
                    int mid = (l+r)/2;
                    if(max_suffix[mid] > m) l = mid;
                    else r = mid;
                }
                if(r+1 < n && a[r] == m && m == query_max(0, n-1, 1, r+1, n-1)) {
                    r++;
                    l++;
                }
                if(m == query_min(0, n-1, 1, i+1, l) && m == query_max(0, n-1, 1, r, n-1)) {
                    found = true;
                    println("YES");
                    println((i+1) + " " + (l-i) + " " + (n-1-l));
                    break;
                }
                    
            }
            if(!found) {
                println("NO");
            }
        }
    }

    int[] a;
    
    int[] max;
    int[] min;
    
    void build(int il, int ir, int i) {
        if(il == ir) {
            max[i] = a[il];
            min[i] = a[il];
        } else {
            int imid = (il+ir)/2;
            build(il, imid, 2*i);
            build(imid+1, ir, 2*i+1);
            max[i] = Math.max(max[2*i], max[2*i+1]);
            min[i] = Math.min(min[2*i], min[2*i+1]);
        }
    }
    
    int query_min(int il, int ir, int i, int ql, int qr) {
        if(il > qr || ir < ql) return 1<<30;
        
        if(ql <= il && ir <= qr) {
            return min[i];
        }
        
        int imid = (il+ir)/2;
        int q_l = query_min(il, imid, 2*i, ql, qr);
        int q_r = query_min(imid+1, ir, 2*i+1, ql, qr);
        return Math.min(q_l, q_r);
    }
    
    int query_max(int il, int ir, int i, int ql, int qr) {
        if(il > qr || ir < ql) return 0;
        
        if(ql <= il && ir <= qr) {
            return max[i];
        }
        
        int imid = (il+ir)/2;
        int q_l = query_max(il, imid, 2*i, ql, qr);
        int q_r = query_max(imid+1, ir, 2*i+1, ql, qr);
        return Math.max(q_l, q_r);
    }
    
//  Main() throws FileNotFoundException { super(new File("output.txt")); }
//  InputReader sc = new InputReader(new FileInputStream("test_input.txt"));
    
  Main() { super(System.out); }
  InputReader sc = new InputReader(System.in);
  static class InputReader {
      InputReader(InputStream in) { this.in = in; } InputStream in;
      
      private byte[] buf = new byte[16384];
      private int    curChar;
      private int    numChars;
      
 
      public int read() {
          if (numChars == -1)
              throw new InputMismatchException();
          if (curChar >= numChars) {
              curChar = 0;
              try {
                  numChars = in.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 nextString() {
          int c = read();
          while (isSpaceChar(c))
              c = read();
          StringBuilder res = new StringBuilder();
          do {
              res.appendCodePoint(c);
              c = read();
          } while (!isSpaceChar(c));
          return res.toString();
      }
 
      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;
      }
 
      private boolean isSpaceChar(int c) {
          return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
      }
 
      private boolean isEndOfLine(int c) {
          return c == '\n' || c == '\r' || c == -1;
      }
  }
 
    public static void main(String[] $) {
        new Thread(null, new Runnable() {
            public void run() {
                long start = System.nanoTime();
                try {Main solution = new Main(); solution.solve(); solution.close();} 
                catch (Exception e) {e.printStackTrace(); System.exit(1);}
                System.err.println((System.nanoTime()-start)/1E9);
            }
        }, "1", 1 << 27).start();
 
    }
    
 
}