"Murlocs tend to be stronger in the early game, whereas Mechs are stronger in the late game."
xtq loves to play hearthstone battlegrounds. He noticed that only murlocs can beat murlocs in the late game. So he wonders when he can win if they both have murlocs. Note that in this problem the rules are different from the real game.
To simplify the problem, there are only four kinds of murlocs —
1.

with poisonous, divine shield and deathrattle that summon a 1/1 plant.
2.

with poisonous and divine shield.
3.

with poisonous and deathrattle that summon a 1/1 plant.
4.

with poisonous.
x/y represents a minion with x attack and y health. When a minion attacks another minion, they will deal damage to each other, and the damage they deal is equal to their attack. Formally, if a minion with

attacks a minion with

, then

will become

, and

will become

, if neither of these two minions has a divine shield. And if a minion's health becomes lower or equal to 0, it is destroyed. The followings are the explanation of the keywords:
- Poisonous: Destroys the enemy if it is damaged by the minion.
- Divine Shield: Grants unit invulnerability against exactly one attack.
- Deathrattle: An ability activates when the minion is destroyed.
The plant is a kind of minion without special ability.
Note that if a minion with a poisonous attack a minion with divine shield, the minion with divine shield won't die, but its divine shield will disappear. Each turn, a minion will attack an enemy minion. They will attack each other until one of the players has no minions. If xtq still has at least one minion at the end of the game, xtq will win the game. It's too difficult to predict the result of the game if minions attack randomly. But fortunately, xtq has very good luck, so if it is possible to win, he can win the game, no matter how small the probability is. You can look at the explanation of the example to have a better understanding of the rules.
xtq now has

murlocs of kind i, and his opponent has

murlocs of kind
)
. You need to find that if xtq can win or not.
输入描述:
The first line contains one integer T
— the number of test cases.
The first line of each test case contains four integers
, which represent the number of each kind of murlocs xtq has at first.
The second line of each test case contains four integers
, which represent the number of each kind of murlocs xtq's opponent has at first.
The sum of
over all test cases does not exceed
.
输出描述:
Print T lines — for each test case print "Yes" if xtq can win or "No" if xtq can't (without quote).
示例1
输入
复制
3
1 0 1 0
1 0 1 0
1 0 0 1
0 1 1 0
1 0 0 1
1 0 1 0
备注:
For the first test case, let
be the xtq's first kind of murloc,
be the xtq's third kind of murloc,
be the enemy's first kind of murloc,
be the enemy's third kind of murloc. Then xtq can do the following operations to win the game:
- Let
attack
, then they will both be destroyed and summon a 1/1 plant, call them
and
.
- Let
attack
, then the divine shield of
will disappear, and
will be destroyed.
- Let
attack
, then the divine shield of
will disappear, note that
now has no divine shield, so it will die and summon a 1/1 plant, call it
.
- Let
attack
, then
will be destroyed.
- Let
attack
, then
will be destroyed.
After these operations,
is still on the board but xtq's enemy now has no minions, so xtq can win the game.
For the second test case, let
be the xtq's first kind of murloc,
be the xtq's fourth kind of murloc,
be the enemy's second kind of murloc,
be the enemy's third kind of murloc. Then xtq can do the following operations to win the game:
- Let
attack
, then their divine shields will both disappear.
- Let
attack
, then they will both die and summon a 1/1 plant, call them
and
.
- Let
attack
, then
will be destroyed.
- Let
attack
, then they will both be destroyed.
After these operations,
is on the board but xtq's enemy now has no minions, so xtq can win the game.
For the third test case, no matter how the minions attack, xtq can't win the game.