disha-and-puppies

Disha loves dancing and loves to play with little cute puppies. One fine day, while she was dancing in OAT at NITH, she saw some N groups of puppies with at least 1 puppy in each group. She loves puppies so much that instantly she left dancing and came near to puppies to play with them. 

But the problem is that she wants to play with K number of puppies at a time. Now, she needs to select K number of puppies to play with, out of all the groups of puppies such that either all the puppies from a group should be taken or none of the puppy from the group should be taken (as she doesn't want any other puppy to feel left out of the group).
 She doesn't know if this is possible or not so she needs your help. You need to tell her if this is possible or not by printing 'Yes' or 'No'(without quotes).
If the answer comes out to be 'Yes' then she starts playing with the puppies but if the answer comes out to be 'No', she wants you to find the number of puppies that she can select nearest to K following the above condition (consider 0 number of puppies to be as one of her selections). If there are two possibilities of the selection of puppies, print the larger number of puppies that she can select.
INPUT
The first line of the input contains an integer T, the number of test cases.
For each test case, the first line contains two integers N and K separated by a single space. Next line contains N space separated integers denoting the number of puppies in N groups.

OUTPUT
For each test case, print 'Yes' or 'No'(without quotes).
If 'No', in next line print the no. of puppies nearest to K that can be selected.

Constraints
T ≤ 50000
1 ≤ N ≤ 1000
1 ≤ K ≤ Total no. of puppies in all the groups
1 ≤ puppy[i] ≤ 1000 where puppy[i] represents number of puppies in N groups.

SAMPLE INPUT
2
5 10
3 8 3 2 4 
1 3 
7

SAMPLE OUTPUT
Yes
No
0

Explanation

Test case 1: 10 puppies can be selected by either groups 1,3 and 5 or by groups 2 and 4.
Test case 2: 0 puppies can be selected nearest to 3.

Source: hackerearth | Difficulty: EASY


Solutions: