题目描述
Chef has a sequence of integers A of length N. He creates another sequence B of length $2 \cdot N using sequence A. Initially, B$ is empty. Chef performs the following process.
For each element A_{i} (1 ≤ i ≤ N) of A:
Choose any arbitrary integer k (Note that the value of k can be different for different elements).
Add A_{i}-k and A_{i}+k to B.
Chef then shuffles the sequence B randomly after this process.
Since Chef is careless, he lost both A and B and now only vaguely remembers the elements of B. Chef would like to know if the sequence B (which he vaguely remembers) can be correct or not. Can you help him?
Formally, you are provided with a sequence B of size $2 \cdot N.$ You are required to tell if the provided sequence can be achieved from any sequence A of size N using the given process or not.
------ Input Format ------
- The first line of the input contains a single integer T - the number of test cases. The description of T test cases follows.
- The first line of each test case contains a single integer N.
- The second line of each test case contains $2 \cdot N space-separated integers B_{1},B_{2}, \dots,B_{2 \cdot N}$.
------ Output Format ------
- For each test case, print YES if the provided sequence B can be achieved from any sequence A of size N using the given process. Otherwise, print NO.
You may print each character of YES and NO in uppercase or lowercase (for example, the strings yEs, yes, Yes and YES will be treated identical).
------ Constraints ------
$1 ≤ T ≤ 10^{4}$
$1 ≤ N ≤ 10^{5}$
$|B| = 2 \cdot N$
$ - 10^{5} ≤ B_{i} ≤ 10^{5}$
- It is guaranteed that the sum of $N$ over all test cases does not exceed $2 \cdot 10^{5}$
----- Sample Input 1 ------
3
1
1 1
2
16 2 2022 2001
2
2 4 -2 4
----- Sample Output 1 ------
YES
NO
YES
----- explanation 1 ------
- Test case $1$: The given sequence $B$ can be generated using $A = [1]$ with $k=0$ for $A_{1}$.
- Test case $2$: There doesn't exist any sequence $A$ which can generate the given sequence $B$ by simulating the given process.
- Test case $3$: The given sequence $B$ can be generated using $A = [4,0]$ with $k= 0$ for $A_{1}$ and $k=-2$ for $A_{2}$.
输入格式
见题面
输出格式
见题面