#Lutece0229. Add number

Add number

Migrated from Lutece 229 Add number

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Employees of Baidu like to play a game called Making Numbers. It goes like this: there are two players in the game, one is called little A, the other little B. There are some cards with a number on each one of them, little A chooses a number XX from 11 to NN randomly, while little B has to choose some cards, the sum of which equals XX. Now there are already MM cards with numbers, and KK blank cards. At the beginning of the game, little B is allowed to write numbers on the blank cards. Now little B wants to know, if it is possible to write some numbers that will assure him of the victory, that is to say, if it is possible for him to make up any number from 11 to NN with the cards.

Input

The input consists of several test cases. The first line is an integer TT , in the second line of each case are 33 numbers, N,M,KN,M,K, the second line shows the number that is already written on MM cards. $1 \leq N \leq 99999999,0 \leq M \leq 19,1 \leq K \leq 19$ The numbers in the second line are above 00, smaller than or equals NN, in non-descending order.

Output

If little B can make it, output YES, else output NO.

Samples

3
15 0 4
12 3 2
3 3 3
13 3 2
3 3 3
YES
YES
NO

Resources

第四届北京邮电大学程序设计竞赛决赛