{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Sidaga calls a sequence *beautiful* if the sum of elements of this sequence is strictly positive.\r\n\r\nKaspers gave Sidaga a sequence $A_1, A_2, \\ldots, A_N$ and asked him to partition it into exactly $K$ non-empty **contiguous** subsequences such that each element of $A$ belongs to exactly one subsequence and all $K$ subsequences are beautiful.\r\n\r\nSidaga is getting ready for his wedding - he is busy learning how to dance, so he cannot solve this problem. Can you help him?\r\n\r\n### Input\r\n- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.\r\n- The first line of each test case contains two space-separated integers $N$ and $K$.\r\n- The second line contains $N$ space-separated integers $A_1, A_2, \\ldots, A_N$.\r\n\r\n### Output\r\nFor each test case, print a single line containing the string `\"YES\"` if it is possible to partition $A$ into $K$ contiguous subsequences or `\"NO\"` otherwise.\r\n\r\nIf it is possible to partition $A$, print a second line containing $K$ space-separated integers $B_1, B_2, \\ldots, B_K$ denoting the sizes of the subsequences, where $1 \\le B_i$ for each valid $i$ and $B_1 + B_2 + \\ldots + B_K \u003d N$. The first $B_1$ elements of $A$ belong to the first subsequence, the next $B_2$ elements belong to the second subsequence and so on.\r\n\r\nIf there is more than one solution, you may print any one.\r\n\r\n### Constraints\r\n- $1 \\le T \\le 1,000$\r\n- $1 \\le K \\le N \\le 5 \\cdot 10^5$\r\n- $0 \\le |A_i| \\le 10^9$ for each valid $i$\r\n- the sum of $N$ over all test cases does not exceed $5 \\cdot 10^5$ \r\n\r\n### Example Input\r\n```\r\n2\r\n4 2\r\n2 -1 1 3 \r\n2 2\r\n1 -1\r\n```\r\n\r\n### Example Output\r\n```\r\nYES\r\n1 3\r\nNO\r\n```\r\n\r\n### Explanation\r\n**Example case 1:**\r\n\r\nIn first case, there are more than one options. Another such valid option is {2,2}.\r\n\r\nIn second case, it is not possible."}}]}