| Kotlin Heroes: Episode 14 |
|---|
| Finished |
Alice and Bob are playing a card game. The game consists of $$$3$$$ rounds, in each round both players score some points (from $$$0$$$ to $$$k$$$), and for each round, Alice's score differs from Bob's score. The player who scores more points in a round is considered the winner of that round.
In the first round, Alice scored $$$a_1$$$ points, and Bob scored $$$b_1$$$. In the second round, Alice scored $$$a_2$$$ points, and Bob scored $$$b_2$$$.
The winner of the game is the one who has the higher total score. If Alice's total score equals Bob's total score, the player who won more rounds is declared the winner. Alice wants to understand if Bob has a chance to win, or if she will definitely win regardless of the results of the $$$3$$$-rd round. Help her determine this!
Please note that in each round, a player can score at least $$$0$$$ and at most $$$k$$$ points. Additionally, for each round, Alice's score differs from Bob's score.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.
Each test case consists of three lines:
For each test case, output NO if Alice will win regardless of the results of the third round, or YES if Bob has a chance to win.
562 31 453 13 133 13 1100 110 043 13 1
YESYESNOYESNO
In the first example, Bob will win if, for example, Alice scores $$$3$$$ points in the last round, and Bob scores $$$2$$$.
In the second example, Bob will win if Alice scores $$$0$$$ points in the last round, and Bob scores $$$5$$$.
| Name |
|---|


