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 CPP):

Solution:
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cassert>

using namespace std;

struct MIN {
	int operator()(const int &_a, const int &_b) { return std::min(_a, _b); };
};

template<class T, class V, class REDUCE>
class FST {
public:
	FST(){};
	FST(vector<V> &_data) {build(_data);}
	void build(vector<V> &_data){
		data.resize(_data.size() * 4);
		size = _data.size();
		for(int i = 0; i < _data.size(); i++)update(i, _data[i]);
	}
	
	void update(size_t _i, T _v) {
		assert(_i < size);
		_update(_i, 0, size, _v, 1);
	}

	T _update(size_t _i, size_t _l, size_t _r, T _v,size_t _p) {
		assert(_p < data.size());
		
		//cerr << "_update(" << _i << ", " << _l << ", " << _r << ", " << _v << ", " << _p << ") -> ";
		if (_i == _l && _i + 1 == _r) {
			//cerr << "update value\n";
			data[_p] = _v; return _v;
		}
		
		size_t m = (_l + _r) / 2;
		if (m >= _i + 1) {
			//cerr<< "goto left(" << _l << ", " << m << ")\n";
			data[_p] = reduce(_update(_i, _l, m, _v, _p * 2), _query(m, _r , m, _r, _p * 2 + 1));
		}
		if (m <= _i) {
			//cerr<< "goto right(" << m << ", " << _r << ")\n";
			data[_p] = reduce(_update(_i, m, _r, _v, _p * 2 + 1), _query(_l, m , _l, m, _p * 2));
		}
		return data[_p];
	}
	
	T query(size_t _begin, size_t _end) {
		assert(_end <= size);
		return _query(_begin, _end, 0, size, 1);
	}
	
	T _query(size_t _begin, size_t _end, size_t _l, size_t _r, size_t _p) {
		//cerr << "_query(" << _begin << ", " << _end << ", " << _l << ", " << _r << ", " << _p << ") -> ";
		assert(_p < data.size());
		
		if (_begin <= _l && _r <= _end) {
			//cerr << "return value ("<<data[_p]<<")\n";
			return data[_p];
		}
		
		size_t m = (_l + _r) / 2;
		if (m >= _end) {
			//cerr<< "goto left(" << _l << ", " << m << ")\n";
			return _query(_begin, _end, _l, m, _p * 2);
		}
		if (m <= _begin) {
			//cerr<< "goto right(" << m << ", " << _r << ")\n";
			return _query(_begin, _end, m, _r, _p * 2 + 1);
		}
		//cerr << "reduce\n";
		return reduce(_query(_begin, _end, _l, m, _p * 2), _query(_begin, _end, m, _r, _p * 2 + 1));
	}
	vector<T> data;
private:
	REDUCE reduce;
	size_t size;
};

typedef FST<int, int, MIN> MINST;

int main(int argc, char **argv) {
	int n, t;
	cin >> t;
	
	while (t--) {
		cin >> n;
		vector<int> a(n);
		int m = 0;
		for(auto &_a: a) {
			cin >> _a;
			m = max(m, _a);
		}
		
		MINST st(a);
		
		int l = 1, r = n - 1, ml = a[0], mr = a[n - 1];
		
		while (l < r) {
			if (ml < mr) ml = max(ml, a[l++]);
			if (mr < ml) mr = max(mr, a[--r]);
			if (ml != mr || l >= r) continue;
			
			if (ml == m) {
				//cerr << "Check final interval (" << m << ")\n";
				for (; l < r; l++) {
					if (a[l] == ml) {
						cout << "YES" << endl << l << " 1 " << n - l - 1 << endl;
						break;
					}
				}
				break;
			}
			
			if (a[l] <= ml) {
				while (a[l] <= ml) l++;
				if (a[l - 1] == ml) l--;
			}
			
			if (a[r - 1] <= mr) {
				while (a[r - 1] <= mr) r--;
				if (a[r] == mr) r++;
			}
			
			//cerr << "check [" << l << ", " << r << ")\n";
			if (st.query(l, r) == ml) {
				cout << "YES" << endl << l << " " << r - l << " " << n - r << endl;
				break;
			}
			
			if (a[l] == ml) l++;
			if (a[r - 1] == mr) r--;
			
			ml = a[l++];
			mr = a[--r];
		}

		if (l >= r) cout << "NO" << endl;
	}
}