An array $$$b$$$ of length $$$m$$$ is called good if it satisfies the following conditions:
You are given an array $$$a$$$ of length $$$n$$$ ,where $$$n$$$ is even. Determine whether it can be rearranged into a good array.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows.
The first line of each test case contains a single integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10^5$$$). It is guaranteed that $$$n$$$ is even.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \cdots, a_n$$$ ($$$0 \le a_i \le n$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.
For each testcase, print YES if the given array is beautiful and NO otherwise.
You can output YES and NO in any case (for example, strings yES, yes and Yes will be recognized as a positive response).
441 3 0 361 0 1 0 1 161 4 0 1 5 660 1 2 0 1 2
YESNOYESNO
In the first test case, $$$a=[1,3,0,3]$$$ can be rearranged into $$$a'=[0,1,3,3]$$$.
We can see $$$a'=[0,1,3,3]$$$ is good because $$$\operatorname{mex} $$$$$$(\operatorname{mex}$$$$$$(a'_1, a'_3)$$$$$$,$$$$$$\operatorname{mex}$$$ $$$(a'_2, a'_4)) = $$$$$$\operatorname{mex} $$$$$$(\operatorname{mex}$$$$$$(0, 3)$$$$$$,$$$$$$\operatorname{mex}$$$ $$$(1, 3)) = $$$$$$\operatorname{mex}$$$ $$$(1, 0) = 2 = $$$$$$\operatorname{mex}$$$$$$(a'_1, a'_2, a'_3 ,a'_4)$$$.