You are given $$$n$$$ integers, where $$$n$$$ is an even number. Determine if they can be paired into $$$\frac{n}{2}$$$ pairs such that the sums of the two numbers in each pair are equal for all pairs.
In the first line, there is an integer $$$T$$$, the number of test cases.
For each case, there is a line with an integer $$$n$$$, followed by a line with the $$$n$$$ integers $$$a_1, \ldots, a_n$$$ that need to be paired.
For each case, if the numbers can be paired, write a line with "SI". Otherwise, write a line with "NO".
$$$1 \leq T \leq 100$$$
$$$4 \leq n \leq 10^5$$$, $$$n$$$ is an even number, the sum of $$$n$$$ for all cases is less than $$$5 \cdot 10^5$$$
$$$-10^8 \leq a_i \leq 10^8$$$ for $$$1 \leq i \leq n$$$
40 points: $$$n = 6$$$, $$$T \leq 30$$$
50 points: $$$n \leq 1000$$$, the sum of $$$n$$$ for all cases is less than $$$5000$$$
10 points: No additional restrictions
3 4 -2 1 -1 2 6 2 4 0 6 3 5 8 1 1 1 1 1 1 1 1
SI NO SI
| Название |
|---|


