D. Card Game
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

A and B are playing card games, the game starts with A and B each having some health, called hpa and hpb. Each player starts with n cards, called a1, a2... an and b1, b2... bn, and each player plays one card he has not played before per turn. There are two types of cards: attack cards and defense cards. Each attack card has an atk, if one of them plays an attack card and the other doesn't play a defense card, the other's health will reduce the atk of the attack card; If the other player plays a defense card, his health doesn't decrease. If a player plays a defense card, it has no effect other than to defend against the other's attack.

When a turn ends, if any player's health is less than or equal to zero, the game ends. If only one player's health is less than or equal to zero, the other wins. If both player's health is less than or equal to zero, it is a draw. If after all turns, no player has zero or less health, it is also a draw.

We call the sequence of A's cards played p1, p2... pn, and call the sequence of B's cards played q1, q2... qn, they are permutations from 1 to n. If the game hasn't been over before the i - th turn, in the i - th turn, A will play api, and B will play bqi.

Now you know A and B's cards. The question is whether there exists a pair of sequences of A and B's cards played that will make A win.

Input

The first line contains an integer T, indicating the number of test sets.

And then for each set of data. The first line contains three integers n, hpa, and hpb, which indicate the number of cards per player and the initial health of two players. The second line contains n integers a1, a2... an, indicating A's cards, where ai =  - 1 indicates the defense card, and in other cases indicates the attack card and ai is the atk. The third line contains n integers b1, b2... bn, indicating B's cards, in the same way.

It guaranteed that T ≤ 100. For all T test sets, the sum of n is less than 105. 1 ≤ hpa, hpb ≤ 108. 1 ≤ ai, bi ≤ 108 or equal to  - 1.

Output

For each set of data, output a string, "yes" or "no", indicating whether there exists a pair of sequences of A and B's cards played that will make A win.

Example
Input
2
3 4 9
-1 7 3
5 2 1
5 9 11
3 -1 6 4 1
-1 -1 10 5 2
Output
yes
no