P10245 Swimming Pool

Background

**Please note that in quadrilateral $ABCD$, the four points must be in order as $A,B,C,D$.** Cases like $AB$ being a diagonal are not allowed.

Description

Little J wants to build a quadrilateral swimming pool $ABCD$. He wants one pair of opposite sides to be parallel (so it is convenient to hold some family competitions), and the other pair of opposite sides to be not parallel (otherwise it would look too ordinary). In other words, **he needs this swimming pool to be a trapezoid**. Given four positive integers $p,q,r,s$, determine whether he can build a swimming pool that satisfies the requirement, such that $AB=p$, $BC=q$, $CD=r$, and $DA=s$.

Input Format

**This problem contains multiple test cases.** The first line of input contains a positive integer $T$ indicating the number of test cases. The next $T$ lines each contain four positive integers $p,q,r,s$ separated by spaces.

Output Format

For each test case, output one line. If a trapezoid can be formed, output `yes`; otherwise output `no`.

Explanation/Hint

[Sample Explanation] In the first test case, it is obviously impossible to form a quadrilateral. In the second test case, it can only form a parallelogram. In the third test case, it can indeed form a trapezoid. [Constraints] This problem has $6$ test points. Note that the points are not evenly distributed. |Test Point ID|Special Property|Score| |:-:|:-:|:-:| |$1$|A trapezoid can be formed if and only if a quadrilateral can be formed.|$19$| |$2$|$p