PaiGuDragon took part in a
round robin style group-stage
football game.
There are

teams in the group competition, with the marks of

respectively, PaiGuDragon is in team
There will be one match between each two teams, and

matches will be held.
For each game, the team with more goals will be the winner.
The winner will get

points, the loser will get

points.
If two teams get the same number of goals, each team get

points
After the group match, the team with higher points will be ranked higher. If the points are the same, the team with more difference goals (goals minus lost goals) will be ranked higher. If the difference goals are the same, the team with more goals will be ranked higher. Otherwise, the team will be ranked higher by drawing lots.
The top three will advance to the knockout stage.
There will be

rounds. The schedule is as follows
Round 1: 1 vs 2, 3 vs 4, 5 vs 6
Round 2: 1 vs 3, 2 vs 5, 4 vs 6
Round 3: 1 vs 4, 2 vs 6, 3 vs 5
Round 4: 1 vs 5, 2 vs 4, 3 vs 6
Round 5: 1 vs 6, 2 vs 3, 4 vs 5
The results of the first three rounds have been given.
PaiGuDragon is so disappointed with it's performance, but we should never give up, right?
Can PaiGuDragon creates miracles in the remaining two rounds?
Will PaiGuDragon has the possibility to qualify for the knockout stage?
The input consists of multiple test cases. The first line contains a single integer
- the number of test cases. Description of the test cases follows.
The first line of each test case contains
integers - the number of goals of team
in order, representing the results of the first round, each number is a non-negtive integer between
to 
The second line of each test case contains

integers - the number of goals of team

in order, representing the results of the second round, each number is a non-negtive integer between

to

The third line of each test case contains 6 integers - the number of goals of team

in order,representing the results of the third round, each number is a non-negtive integer between

to

ps:The number of goals in the last two rouns can be any non-negative integer