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.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.stream.Stream;

public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Main().new Scanner(inputStream);
		Writer out = new Main().new Writer(outputStream);
		Main solver = new Main();
		solver.solve2(in, out);
	}

	public void solve2(Scanner in, Writer out) {
		int t = in.ni();
		for (int ii = 0; ii < t; ii++) {
			int n = in.ni();
			int[] arr = in.nia(n);
			int[] rarr = new int[n];
			for (int j = 0; j < n; j++)
				rarr[j] = -arr[j];
			SegmentTreeRMQ smin = new SegmentTreeRMQ(arr);
			SegmentTreeRMQ smax = new SegmentTreeRMQ(rarr);
			int max = 0;
			boolean g = false;
			for (int i = 1; i <= n - 2; i++) {
				max = Math.max(max, arr[i-1]);
				int ind = smin.firstle(i, max - 1);
				if(ind == -1) ind = n;
				if(i < ind && ind < n && smin.min(i, ind) == max && smax.min(ind, n) == -max) {
					System.out.println("YES");
					System.out.println(i + " " + (ind-i) + " " + (n-ind)); g=true;
					break;
				}
				if(i < ind-1 && smin.min(i, ind-1) == max && smax.min(ind-1, n) == -max){
					System.out.println("YES");
					System.out.println(i + " " + (ind-1-i) + " " + (n-(ind-1))); g=true;
					break;
				}
			}
			if(!g) System.out.println("NO");
		}
		
	}
	
	public int bsr(int[] amax, int start, int end, int target) {
		int low = start;
		int high = end;
		while(low <= high) {
			int mid = (low + high) / 2;
			if(amax[mid] >= target) {
				low = mid + 1;
			} else if (amax[mid] < target) {
				high = mid - 1;
			}
		}
		return low;
	}

	public void solve(Scanner in, Writer out) {
		int t = 1;
		int n = in.ni(), m = in.ni();
		while (n != 0 && m != 0) {
			int[] nums = in.nia(n);
			int[] commons = new int[1 << n];
			int k = in.ni();
			for (int i = 0; i < k; i++) {
				int le = in.ni();
				int sum = 0;
				for (int j = 0; j < le; j++)
					sum += 1 << (in.ni() - 1);
				commons[sum] += in.ni();
			}
			long max = 0;
			int best = 0;
			for (int i = 0; i < 1 << n; i++) {
				if (Integer.bitCount(i) == m) {
					long sum = 0;
					for (int j = 0; j < n; j++) {
						if ((i & (1 << j)) != 0)
							sum += nums[j];
					}
					for (int j = 0; j < commons.length; j++) {
						int bis = Integer.bitCount(j & i);
						if (bis >= 2) {
							sum -= (bis - 1) * commons[j];
						}
					}
					if (sum > max) {
						max = sum;
						best = i;
					}
				}
			}
			System.out.println("Case Number  " + t);
			System.out.println("Number of Customers: " + max);
			System.out.print("Locations recommended: ");
			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < n; i++) {
				if ((best & (1 << i)) != 0) {
					sb.append((i + 1) + " ");
				}
			}
			System.out.println(sb.toString().trim());
			n = in.ni();
			m = in.ni();
			t++;
			System.out.println();
		}
	}

	public static class SegmentTreeRMQ {
		public final int M, H, N;
		public int[] vals;
		public static final int I = Integer.MAX_VALUE;
 
		public SegmentTreeRMQ(int n)
		{
			N = n;
			M = Integer.highestOneBit(Math.max(N-1, 1))<<2;
			H = M>>>1;
			vals = new int[M];
			Arrays.fill(vals, 0, M, I);
		}
 
		public SegmentTreeRMQ(int[] a)
		{
			this(a.length);
			for(int i = 0;i < N;i++){
				vals[H+i] = a[i];
			}
			//		Arrays.fill(vals, H+N, M, I);
			for(int i = H-1;i >= 1;i--)propagate(i);
		}
 
		public void update(int pos, int x)
		{
			vals[H+pos] = x;
			for(int i = (H+pos)>>>1;i >= 1;i >>>= 1)propagate(i);
		}
 
		private void propagate(int i)
		{
			vals[i] = Math.min(vals[2*i], vals[2*i+1]);
		}
 
		public int min(int l, int r){
			int min = I;
			if(l >= r)return min;
			l += H; r += H;
			for(;l < r;l>>>=1,r>>>=1){
				if((l&1) == 1)min = Math.min(min, vals[l++]);
				if((r&1) == 1)min = Math.min(min, vals[--r]);
			}
			return min;
		}
 
		public int firstle(int l, int v) {
			if(l >= H)return -1;
			int cur = H+l;
			while(true){
				if(vals[cur] <= v){
					if(cur >= H)return cur-H;
					cur = 2*cur;
				}else{
					cur++;
					if((cur&cur-1) == 0)return -1;
					if((cur&1)==0)cur>>>=1;
				}
			}
		}
 
		public int lastle(int l, int v) {
			if(l < 0)return -1;
			int cur = H+l;
			while(true){
				if(vals[cur] <= v){
					if(cur >= H)return cur-H;
					cur = 2*cur + 1;
				}else{
					if((cur&cur-1) == 0)return -1;
					cur--;
					if((cur&1)==1)cur>>>=1;
				}
			}
		}
	}

	public int[] strToIntArr(String[] arr) {
		return Stream.of(arr).mapToInt(Integer::parseInt).toArray();
	}

	public boolean deq(double a, double b) {
		return Math.abs(a - b) < 0.001;
	}

	public double dist(double a, double b, double c, double d) {
		return Math.sqrt((a - c) * (a - c) + (b - d) * (b - d));
	}

	public boolean hasMore(String line) {
		return line != null && !line.equals("");
	}

	public int max(int a, int b, int c) {
		return Math.max(a, Math.max(b, c));
	}

	public int min(int a, int b, int c) {
		return Math.min(a, Math.min(b, c));
	}

	class Writer {
		PrintWriter output;

		public Writer(OutputStream out) {
			this.output = new PrintWriter(new OutputStreamWriter(out));
		}

		public void println(Object s) {
			output.println(s.toString());
		}

		public void print(Object s) {
			output.print(s.toString());
		}

		public void flush() {
			output.flush();
		}
	}

	class Scanner {
		BufferedReader br;
		StringTokenizer in;

		public Scanner(InputStream inputStream) {
			br = new BufferedReader(new InputStreamReader(inputStream));
		}

		public String next() {
			return hasMoreTokens() ? in.nextToken() : null;
		}

		public String readLine() {
			try {
				return br.readLine();
			} catch (Exception e) {
				e.printStackTrace();
				return null;
			}
		}

		boolean hasMoreTokens() {
			while (in == null || !in.hasMoreTokens()) {
				String s = readLine();
				if (s == null)
					return false;
				in = new StringTokenizer(s);
			}
			return true;
		}

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

		public int ni() {
			return Integer.parseInt(nextString());
		}

		public double nd() {
			return Double.parseDouble(nextString());
		}

		public long nl() {
			return Long.parseLong(nextString());
		}

		public int[] nia(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = ni();
			}
			return a;
		}

		public long[] nla(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = ni();
			}
			return a;
		}
	}

	class Pair implements Comparable<Pair> {
		long _first, _second;

		public Pair(int f, int s) {
			_first = f;
			_second = s;
		}

		public Pair(Long f, Long s) {
			_first = f;
			_second = s;
		}

		public int compareTo(Pair o) {
			if (this.first() != o.first())
				return Long.compare(this.first(), o.first());
			else
				return Long.compare(this.second(), o.second());
		}

		long first() {
			return _first;
		}

		long second() {
			return _second;
		}

		int firsti() {
			return (int) _first;
		}

		int secondi() {
			return (int) _second;
		}
	}

	class Triple implements Comparable<Triple> {
		Integer _first, _second, _third;

		public Triple(Integer f, Integer s, Integer t) {
			_first = f;
			_second = s;
			_third = t;
		}

		public int compareTo(Triple o) {
			if (!this.first().equals(o.first()))
				return this.first() - o.first();
			else if (!this.second().equals(o.second()))
				return this.second() - o.second();
			else
				return this.third() - o.third();
		}

		Integer first() {
			return _first;
		}

		Integer second() {
			return _second;
		}

		Integer third() {
			return _third;
		}

		public String toString() {
			return first() + " " + second() + " " + third();
		}
	}

	class UnionFind {
		private ArrayList<Integer> p, rank, setSize;
		private int numSets;

		public UnionFind(int N) {
			p = new ArrayList<>(N);
			rank = new ArrayList<>(N);
			setSize = new ArrayList<>(N);
			numSets = N;
			for (int i = 0; i < N; i++) {
				p.add(i);
				rank.add(0);
				setSize.add(1);
			}
		}

		public int find(int i) {
			if (p.get(i) == i)
				return i;
			else {
				int ret = find(p.get(i));
				p.set(i, ret);
				return ret;
			}
		}

		public boolean connected(int i, int j) {
			return find(i) == find(j);
		}

		public void union(int i, int j) {
			if (!connected(i, j)) {
				numSets--;
				int x = find(i), y = find(j);
				if (rank.get(x) > rank.get(y)) {
					p.set(y, x);
					setSize.set(x, setSize.get(x) + setSize.get(y));
				} else {
					p.set(x, y);
					setSize.set(y, setSize.get(y) + setSize.get(x));
					if (rank.get(x) == rank.get(y))
						rank.set(y, rank.get(y) + 1);
				}
			}
		}

		public int numDisjointSets() {
			return numSets;
		}

		public int size(int i) {
			return setSize.get(find(i));
		}
	}

}