| Codeforces Round 1046 (Div. 2) |
|---|
| Finished |
Two football teams, the RiOI team and the KDOI team, are about to have a football match. A football match consists of two halves — the first half and the second half. At the beginning of the match, both teams have a score of $$$0$$$.
As a fan of both teams, Aquawave knows that the two teams have similar levels, so neither team will score three consecutive goals in the same half.
Aquawave had a dream the night before the match, in which:
You have to determine whether Aquawave's dream can come true according to the above information.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 1000$$$). The description of the test cases follows.
The only line of each test case contains four integers $$$a$$$, $$$b$$$, $$$c$$$, and $$$d$$$ ($$$0 \le a \le c \le 100$$$, $$$0\le b \le d \le 100$$$) — the score at the end of the first half and the score at the end of the second half.
For each test case, print "YES" if Aquawave's dream can come true. Otherwise, print "NO".
You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.
111 4 1 44 1 4 11 4 2 50 100 0 1001 4 2 93 1 13 58 11 17 3619 41 30 5020 38 30 600 0 0 0100 100 100 100
YES YES YES NO NO YES NO NO YES YES YES
We will use $$$\texttt{R}$$$ to represent the RiOI team's goal, and $$$\texttt{K}$$$ to represent the KDOI team's goal.
In the first test case, the only goal order is:
In the second test case, the only goal order is:
In the third test case, one possible goal order is:
In the fourth test case, at the end of the first half, the KDOI team has scored $$$100$$$ goals, while the RiOI team did not score any goals. Thus, in Aquawave's dream, the KDOI team scored $$$100$$$ consecutive goals in the first half, which is impossible.
| Name |
|---|


