B. Rectangle
- Giới hạn thời gian
- 1,0 s
- Giới hạn bộ nhớ
- 256 MB
- Điểm
- 1một phần
- Tỉ lệ AC
- 52,0%
- Người giải
- 163
Given four integers, check whether these four integers can form the four sides of a rectangle.
A valid rectangle must have two pairs of equal-length sides.
Input
- The input starts with a positive integer
— the number of test cases. Each test case is printed in a single line with four integers with the value in the range
to
.
Output
- For each test case, print "YES" if the given four integers can form the four sides of a rectangle; otherwise, print "NO".
Example
Input
3
1 1 2 2
3 2 4 2
5 3 5 3Output
YES
NO
YES
Bình luận