D. Large Family
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

The OIE arrives, and your family decides to take the opportunity to travel to Coruña with you, enjoying the city while you suffer solving problems. However, this plan will not be easy to carry out, as there are many of you in the family and you have only one car.

In your family, there are $$$n$$$ people, and you have a single car with $$$k$$$ seats. Therefore, to go to Coruña, you will have to make several trips. Initially, the car and the $$$n$$$ family members are in your city. In each trip, the car will move from your city to Coruña or from Coruña to your city, transporting between $$$1$$$ and $$$k$$$ family members, one of whom will be the driver.

Moreover, it would be dangerous for the same person to drive too much. Depending on their situation, some family members can drive more or fewer times (some do not even have a license, so they cannot drive at all). Specifically, the $$$i$$$-th family member can drive at most $$$a_i$$$ times without becoming a danger to road safety.

Determine if the trip your family plans is possible, and if it is, write an itinerary that your family can follow so that everyone arrives in Coruña without anyone driving too much.

Input

The first line contains an integer $$$T$$$, the number of cases. The following $$$T$$$ cases each consist of $$$2$$$ lines:

  • The first line contains $$$n$$$ and $$$k$$$, the number of family members and the number of seats in your car.
  • The second line contains the $$$n$$$ integers $$$a_1,\ldots,a_n$$$, the number of times each family member can drive.
Output

For each case, you must print on a single line with "SI" or "NO", depending on whether your family's plan is possible.

If it is possible, you must then print a valid itinerary. First, print a single line with an integer $$$m$$$, the number of trips in your itinerary. Since the car alternates its position, odd trips will be from your city to Coruña and even trips will be from Coruña to your city.

For each trip, you must print two lines.

  • The first line contains an integer $$$1\le h \le k$$$, the number of occupied seats in the car.
  • The second line contains $$$h$$$ integers, the numbers of the family members traveling in that car. The first number you print will be the driver.
Scoring
  1. (16 points) $$$k=2$$$.
  2. (25 points) $$$k=3$$$.
  3. (14 points) $$$a_i\le 1$$$.
  4. (23 points) $$$a_i\le 2$$$.
  5. (22 points) No additional restrictions.
Example
Input
2
6 3
2 1 0 3 0 1
5 2
0 2 0 1 0
Output
SI
5
3
6 2 5 
1
2 
3
1 2 3 
1
1 
2
4 1 
NO
Note
  • $$$1\le T \le 1000$$$
  • $$$2 \le n \le 100$$$
  • $$$2\le k \le 100$$$
  • $$$0\le a_i \le 200000$$$
  • The sum of all $$$a_i$$$ across all cases is at most $$$200000$$$