{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou are given an array $$$a$$$ consisting of $$$n$$$ integers.\u003c/p\u003e\u003cp\u003eLet $$$min(l, r)$$$ be the minimum value among $$$a_l, a_{l + 1}, \\ldots, a_r$$$ and $$$max(l, r)$$$ be the maximum value among $$$a_l, a_{l + 1}, \\ldots, a_r$$$.\u003c/p\u003e\u003cp\u003eYour task is to choose three \u003cspan class\u003d\"tex-font-style-bf\"\u003epositive\u003c/span\u003e (greater than $$$0$$$) integers $$$x$$$, $$$y$$$ and $$$z$$$ such that:\u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$x + y + z \u003d n$$$; \u003c/li\u003e\u003cli\u003e $$$max(1, x) \u003d min(x + 1, x + y) \u003d max(x + y + 1, n)$$$. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eIn 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).\u003c/p\u003e\u003cp\u003eAmong all such triples (partitions), you can choose any.\u003c/p\u003e\u003cp\u003eYou have to answer $$$t$$$ independent test cases.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains one integer $$$t$$$ ($$$1 \\le t \\le 2 \\cdot 10^4$$$) — the number of test cases. Then $$$t$$$ test cases follow.\u003c/p\u003e\u003cp\u003eThe first line of the test case contains one integer $$$n$$$ ($$$3 \\le n \\le 2 \\cdot 10^5$$$) — the length of $$$a$$$.\u003c/p\u003e\u003cp\u003eThe second line of the test case contains $$$n$$$ integers $$$a_1, a_2, \\ldots, a_n$$$ ($$$1 \\le a_i \\le 10^9$$$), where $$$a_i$$$ is the $$$i$$$-th element of $$$a$$$.\u003c/p\u003e\u003cp\u003eIt is guaranteed that the sum of $$$n$$$ does not exceed $$$2 \\cdot 10^5$$$ ($$$\\sum n \\le 2 \\cdot 10^5$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, print the answer: \u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e in the only line if there is no such partition of $$$a$$$ that satisfies the conditions from the problem statement. Otherwise, print \u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e in the first line and three integers $$$x$$$, $$$y$$$ and $$$z$$$ ($$$x + y + z \u003d n$$$) in the second line.\u003c/p\u003e\u003cp\u003eIf there are several answers, you can print any.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\n11\n1 2 3 3 3 4 4 3 4 2 1\n8\n2 9 1 7 3 9 4 1\n9\n2 1 4 2 4 3 3 1 2\n7\n4 2 1 1 4 1 4\n5\n1 1 1 1 1\n7\n4 3 4 3 3 3 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\n6 1 4\nNO\nYES\n2 5 2\nYES\n4 1 2\nYES\n1 1 3\nYES\n2 1 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}