---
{"category_name":"easy","problem_code":"A1","problem_name":"Paying up","languages_supported":{"0":"ADA","1":"ASM","2":"BASH","3":"BF","4":"C","5":"C99 strict","6":"CAML","7":"CLOJ","8":"CLPS","9":"CPP 4.3.2","10":"CPP 4.9.2","11":"CPP14","12":"CS2","13":"D","14":"ERL","15":"FORT","16":"FS","17":"GO","18":"HASK","19":"ICK","20":"ICON","21":"JAVA","22":"JS","23":"LISP clisp","24":"LISP sbcl","25":"LUA","26":"NEM","27":"NICE","28":"NODEJS","29":"PAS fpc","30":"PAS gpc","31":"PERL","32":"PHP","33":"PIKE","34":"PRLG","35":"PYTH","36":"PYTH 3.4","37":"RUBY","38":"SCALA","39":"SCM guile","40":"SCM qobi","41":"ST","42":"TCL","43":"TEXT","44":"WSPC"},"max_timelimit":7,"source_sizelimit":50000,"problem_author":"admin","problem_tester":null,"date_added":"1-12-2008","tags":{"0":"admin"},"time":{"view_start_date":1367924860,"submit_start_date":1367924860,"visible_start_date":1367924777,"end_date":1735669800},"layout":"problem"}
---
<span class="solution-visible-txt">All submissions for this problem are available.</span><p>In the mysterious country of Byteland, everything is quite different from what you'd
normally expect. In most places, if you were approached by two mobsters in a dark alley, they would
probably tell you to give them all the money that you have. If you refused, or didn't have any -
they might even beat you up.
<p>
In Byteland the government decided that even the slightest chance of someone getting injured has to be ruled out. So, they introduced a strict policy. When a mobster approaches you in a dark
alley, he asks you for a specific amount of money. You are obliged to show him all the money that
you have, but you only need to pay up if he can find a subset of your banknotes whose total value
matches his demand. Since banknotes in Byteland can have any positive integer value smaller than
one thousand you are quite likely to get off without paying.
<p>Both the citizens and the gangsters of Byteland have very positive feelings about the system. No one ever
gets hurt, the gangsters don't lose their jobs, and there are quite a few rules that minimize that
probability of getting mugged (the first one is: don't go into dark alleys - and this one is said to work in other places also).
<h3>Input</h3>
<p>
The first line contains integer <i>t</i>, the number of test cases (about 100). Then <i>t</i> test cases follow. Each test case starts with <i>n</i>, the
number of banknotes in your wallet, and <i>m</i>, the amount of money the muggers asked of you. Then <i>n</i>
numbers follow, representing values of your banknotes. Your wallet does not hold more than 20 banknotes, and the value of a single banknote is never more than 1000.
<h3>Output</h3>
<p>
For each test case output a single line with the word 'Yes' if there is a subset of your banknotes that sums to <i>m</i>, and 'No' otherwise.
<h3>Example</h3>
<pre>
<b>Input:</b>
5
3 3
1
1
1
5 11
1
2
4
8
16
5 23
1
2
4
8
16
5 13
1
5
5
10
10
20 132
17
6
4
998
254
137
259
153
154
3
28
19
123
542
857
23
687
35
99
999
<b>Output:</b>
Yes
Yes
Yes
No
Yes
</pre>
<p><b>Explanation:</b> For example, in the last case you have to pay up, since: 6+3+123=132.