Bỏ qua đến nội dung

B. Rectangle

Mã bài: icpchusc2025p2 Nhóm: Uncategorized Dạng bài: Undefined

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 t (1 \le t \le 10^4) — the number of test cases. Each test case is printed in a single line with four integers with the value in the range 1 to 1000.

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 3
Output
YES
NO
YES

Bình luận