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

public class Practice {
  BufferedReader br;
  PrintWriter out;
  StringTokenizer st;
  boolean eof;
  private static final long MOD = 1000L * 1000L * 1000L + 7;
  private static final int[] dx = {0, -1, 0, 1};
  private static final int[] dy = {1, 0, -1, 0};
  private static final String yes = "Yes";
  private static final String no = "No";

  void solve() {
//    int T = 1;
    int T = nextInt();
    for (int i = 0; i < T; i++) {
      helper();
    }
  }

  RMQ seg;
  int n;
  int[] suff;
  void helper() {
    n = nextInt();
    int[] arr = nextIntArr(n);
    seg = new RMQ(arr);
//    seg.build_tree(1, 0, n - 1);
    int[] pref = new int[n];
    suff = new int[n];
    pref[0] = arr[0];
    for (int i = 1; i < n; i++) {
      pref[i] = Math.max(pref[i - 1], arr[i]);
    }
    suff[n - 1] = arr[n - 1];
    for (int i = n - 2; i >= 0; i--) {
      suff[i] = Math.max(suff[i + 1], arr[i]);
    }
    for (int i = 0; i < n; i++) {
      // [0, i] [i + 1, n - 1]
      Pair p1 = find1(i + 1, pref[i]);
      Pair p2 = find2(i + 1, pref[i]);
      if (p1 != null && p2 != null) {
        p2.left--;
        p2.right--;
        int left = Math.max(p1.left, p2.left);
        int right = Math.min(p1.right, p2.right);
        if (left <= right) {
          // [0, i] [i + 1, left] [left + 1, n - 1]
          outln(yes.toUpperCase());
          outln((i + 1) + " " + (left - (i + 1) + 1) + " " + (n - 1 - (left + 1) + 1));
          return;
        }
      }
    }
    outln(no.toUpperCase());
  }

  Pair find1(int from, int target) {
    int low = from;
    int high = n;
    // The first i, [from, i]'s min <= target.
    while (low < high) {
      int mid = (low + high) / 2;
      int query = seg.query(from, mid);
      if (query > target) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    if (low == n) {
      return null;
    }
    int check = seg.query(from, low);
    if (check != target) {
      return null;
    }
    int left = low;
    // The first i, [from, i]'s min < target.
    low = from;
    high = n;
    while (low < high) {
      int mid = (low + high) / 2;
      int query = seg.query(from, mid);
      if (query >= target) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    int right = low - 1;
    return new Pair(left, right);
  }

  Pair find2(int from, int target) {
    int low = from;
    int high = n;
    // The first i, [from, i]'s min <= target.
    while (low < high) {
      int mid = (low + high) / 2;
      int query = suff[mid];
      if (query > target) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    if (low == n) {
      return null;
    }
    int check = suff[low];
    if (check != target) {
      return null;
    }
    int left = low;
    // The first i, [from, i]'s min < target.
    low = from;
    high = n;
    while (low < high) {
      int mid = (low + high) / 2;
      int query = suff[mid];
      if (query >= target) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    int right = low - 1;
    return new Pair(left, right);
  }

  class Pair {
    int left;
    int right;
    public Pair(int left, int right) {
      this.left = left;
      this.right = right;
    }
  }

  class RMQ {
    int[] vs;
    int[][] lift;

    public RMQ(int[] vs) {
      this.vs = vs;
      int n = vs.length;
      int maxlog = Integer.numberOfTrailingZeros(Integer.highestOneBit(n)) + 2;
      lift = new int[maxlog][n];
      for (int i = 0; i < n; i++)
        lift[0][i] = vs[i];
      int lastRange = 1;
      for (int lg = 1; lg < maxlog; lg++) {
        for (int i = 0; i < n; i++) {
          lift[lg][i] = Math.min(lift[lg - 1][i], lift[lg - 1][Math.min(i + lastRange, n - 1)]);
        }
        lastRange *= 2;
      }
    }

    public int query(int low, int hi) {
      int range = hi - low + 1;
      int exp = Integer.highestOneBit(range);
      int lg = Integer.numberOfTrailingZeros(exp);
      return Math.min(lift[lg][low], lift[lg][hi - exp + 1]);
    }
  }

  class SegmentTreeEasy {
    int[] arr;
    int[] tree;

    public SegmentTreeEasy(int[] elements) {
      arr = Arrays.copyOf(elements, elements.length);
      tree = new int[4 * arr.length];
    }

    void build_tree(int node, int startIndex, int endIndex) {
      if (startIndex > endIndex) {
        return; // Out of range
      }
      if (startIndex == endIndex) { // Leaf node
        tree[node] = arr[startIndex]; // Init value
        return;
      }

      build_tree(node * 2, startIndex, (startIndex + endIndex) / 2); // Init left child
      build_tree(node * 2 + 1, 1 + (startIndex + endIndex) / 2, endIndex); // Init right child
      tree[node] = Math.min(tree[node * 2], tree[node * 2 + 1]); // Init root value
    }

    /**
     * Query tree to get max element value within range [queryStartIndex, queryEndIndex]
     */
    int query_tree(int node, int nodeStartIndex, int nodeEndIndex, int queryStartIndex, int queryEndIndex) {
      if (nodeStartIndex > nodeEndIndex || nodeStartIndex > queryEndIndex || nodeEndIndex < queryStartIndex) {
        // Out of range!!! change if necessary
        return Integer.MAX_VALUE;
      }

      if (nodeStartIndex >= queryStartIndex && nodeEndIndex <= queryEndIndex) {
        // Current segment is totally within range [i, j]
        return tree[node];
      }
      int mid = (nodeStartIndex + nodeEndIndex) / 2;
      int q1 = query_tree(node * 2, nodeStartIndex, mid, queryStartIndex, queryEndIndex);
      int q2 = query_tree(1 + node * 2, 1 + mid, nodeEndIndex, queryStartIndex, queryEndIndex);
      return Math.min(q1, q2);
    }
  }

  void shuffle(long[] a) {
    int n = a.length;
    for(int i = 0; i < n; i++) {
      int r = i + (int) (Math.random() * (n - i));
      long tmp = a[i];
      a[i] = a[r];
      a[r] = tmp;
    }
  }
  long gcd(long a, long b) {
    while(a != 0 && b != 0) {
      long c = b;
      b = a % b;
      a = c;
    }
    return a + b;
  }
  private void outln(Object o) {
      out.println(o);
  }
  private void out(Object o) {
      out.print(o);
  }
  private void formatPrint(double val) {
      outln(String.format("%.9f%n", val));
  }
  public Practice() {
    br = new BufferedReader(new InputStreamReader(System.in));
    out = new PrintWriter(System.out);
    solve();
    out.close();
  }
  public static void main(String[] args) {
    new Practice();
  }

  public long[] nextLongArr(int n) {
    long[] res = new long[n];
    for(int i = 0; i < n; i++)
      res[i] = nextLong();
    return res;
  }
  public int[] nextIntArr(int n) {
    int[] res = new int[n];
    for(int i = 0; i < n; i++)
      res[i] = nextInt();
    return res;
  }
  public String nextToken() {
    while (st == null || !st.hasMoreTokens()) {
      try {
        st = new StringTokenizer(br.readLine());
      } catch (Exception e) {
        eof = true;
        return null;
      }
    }
    return st.nextToken();
  }
  public String nextString() {
    try {
      return br.readLine();
    } catch (IOException e) {
      eof = true;
      return null;
    }
  }
  public int nextInt() {
    return Integer.parseInt(nextToken());
  }
  public long nextLong() {
    return Long.parseLong(nextToken());
  }
  public double nextDouble() {
    return Double.parseDouble(nextToken());
  }
}