Problem: You are given an array consisting of integers.
Let be the minimum value among and be the maximum value among .
Your task is to choose three positive (greater than ) integers , and such that:
- ;
- .
In other words, you have to split the array 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 independent test cases.
Input Format: The first line of the input contains one integer () — the number of test cases. Then test cases follow.
The first line of the test case contains one integer () — the length of .
The second line of the test case contains integers (), where is the -th element of .
It is guaranteed that the sum of does not exceed ().
Output Format: For each test case, print the answer: NO in the only line if there is no such partition of that satisfies the conditions from the problem statement. Otherwise, print YES in the first line and three integers , and () in the second line.
If there are several answers, you can print any.