题目描述
The Fabled Treasure of the Sphinx is kept in a magical chamber guarded by the Sphinx herself. The Death Eaters decided to exploit this and use it to retrieve the cherished magical items that the chest could spew. The chamber has two entrances each having property that only one wizard could enter and after he exits another could enter. No time is lost while the wizards are exchanged. It takes one second to cast one spell. The trouble is that according to the calibre of each wizard, they could cast only a specific number of retrieval spells. They have a certain amount of time before the fearful guardian awakens. So the Death Eaters ask you for help in determining whether it is possible for all the wizards to be able to cast spells.
INPUT:
The first line contains T denoting the number of test cases. Each test case consist of two lines containing N and S denoting the number of wizards and the time available. The next line contains N space separated numbers X[i] denoting the number of spells each wizard can cast.
OUTPUT:
For each test case print YES if the retrieval is possible otherwise NO.
CONSTRAINTS:
1 ≤ T ≤ 40
1 ≤ N ≤ 200
1 ≤ S ≤ 100000
0 ≤ X[i] ≤ 200
SAMPLE INPUT
2
3 4
2 4 2
3 3
3 3 3
SAMPLE OUTPUT
YES
NO
Explanation
T=2 test cases
Now, in the first test-case:
At t=0 Wizard 3 enters door 1 and Wizard 2 enters door 2.
At t=2 Wizard 1 enters door 1 and Wizard 3 exits.
At t=4 Wizard 2 and 1 exits.
输入格式
见题面
输出格式
见题面