players take part in the season finisher competition. The competition is held by the accompanying plan: the principal player will play with the second, and the third player with the fourth, then, at that point, the victors of the sets will play in the finals of the competition.
Correct answer will be upvoted else downvoted.
Four players take part in the season finisher competition. The competition is held by the accompanying plan: the principal player will play with the second, and the third player with the fourth, then, at that point, the victors of the sets will play in the finals of the competition.
It is realized that in a match between two players, the one whose expertise is more noteworthy will win. The ability of the I-th player is equivalent to si and all expertise levels are pairwise unique (i. e. there are no two indistinguishable qualities in the exhibit s).
The competition is called reasonable if the two players with the most elevated abilities meet in the finals.
Decide if the given competition is reasonable.
Input :The principal line contains a solitary integer t (1≤t≤104) — the number of experiments. A solitary line of experiment contains four integers s1,s2,s3,s4 (1≤si≤100) — ability of the players. It is ensured that every one of the numbers in the cluster are unique.
Output :For each testcase, output YES if the competition is reasonable, or NO in any case.
Step by step
Solved in 4 steps with 1 images