CF2136A In the Dream
Description
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:
- The score at the end of the first half was $$$a:b$$$, where $$$a$$$ is the score of the RiOI team, and $$$b$$$ is the score of the KDOI team;
- And, the score at the end of the second half was $$$c:d$$$, where $$$c$$$ is the score of the RiOI team, and $$$d$$$ is the score of the KDOI team.
You have to determine whether Aquawave's dream can come true according to the above information.
Input Format
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.
Output Format
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.
Explanation/Hint
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:
- First half: $$$\\texttt{KKRKK}$$$. At the end of the first half, the score is $$$1:4$$$;
- Second half: No goals. At the end of the second half, the score is still $$$1:4$$$.
In the second test case, the only goal order is:
- First half: $$$\\texttt{RRKRR}$$$. At the end of the first half, the score is $$$4:1$$$;
- Second half: No goals. At the end of the second half, the score is still $$$4:1$$$.
In the third test case, one possible goal order is:
- First half: $$$\\texttt{KKRKK}$$$. At the end of the first half, the score is $$$1:4$$$;
- Second half: $$$\\texttt{KR}$$$. At the end of the second half, the score is $$$2:5$$$.
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.