---
category_name: school
problem_code: RECTANGL
problem_name: Rectangle
languages_supported:
- C
- CPP14
- JAVA
- PYTH
- 'PYTH 3.5'
- PYPY
- CS2
- 'PAS fpc'
- 'PAS gpc'
- RUBY
- PHP
- GO
- NODEJS
- HASK
- rust
- SCALA
- swift
- D
- PERL
- FORT
- WSPC
- ADA
- CAML
- ICK
- BF
- ASM
- CLPS
- PRLG
- ICON
- 'SCM qobi'
- PIKE
- ST
- NICE
- LUA
- BASH
- NEM
- 'LISP sbcl'
- 'LISP clisp'
- 'SCM guile'
- JS
- ERL
- TCL
- kotlin
- PERL6
- TEXT
- 'SCM chicken'
- CLOJ
- COB
- FS
max_timelimit: '1'
source_sizelimit: '50000'
problem_author: kingofnumbers
problem_tester: null
date_added: 2-01-2018
tags:
- cakewalk
- jan18
- kingofnumbers
- kingofnumbers
editorial_url: 'https://discuss.codechef.com/problems/RECTANGL'
time:
view_start_date: 1516008600
submit_start_date: 1516008600
visible_start_date: 1516008600
end_date: 1735669800
current: 1525198879
is_direct_submittable: false
layout: problem
---
All submissions for this problem are available.### Read problems statements in [Mandarin chinese](http://www.codechef.com/download/translated/JAN18/mandarin/RECTANGL.pdf), [Russian](http://www.codechef.com/download/translated/JAN18/russian/RECTANGL.pdf) and [Vietnamese](http://www.codechef.com/download/translated/JAN18/vietnamese/RECTANGL.pdf) as well.
You are given four integers **a**, **b**, **c** and **d**. Determine if there's a rectangle such that the lengths of its sides are **a**, **b**, **c** and **d** (in any order).
### Input
- The first line of the input contains a single integer **T** denoting the number of test cases. The description of **T** test cases follows.
- The first and only line of each test case contains four space-separated integers **a**, **b**, **c** and **d**.
### Output
For each test case, print a single line containing one string "YES" or "NO".
### Constraints
- 1 ≤ **T** ≤ 1,000
- 1 ≤ **a**, **b**, **c**, **d** ≤ 10,000
### Subtasks
**Subtask #1 (100 points):** original constraints
### Example
<pre><b>Input:</b>
3
1 1 2 2
3 2 2 3
1 2 2 2
<b>Output:</b>
YES
YES
NO
</pre>