You have an array $$$a$$$ of length $$$n$$$ (n is odd). You can do the following operation with this array:
You have to tell if it is possible to transform the array into a permutation by applying the operation any number of times.
A sequence of $$$n$$$ numbers is called a $$$permutation$$$ if it contains all integers from $$$1$$$ to $$$n$$$ exactly once. For example, the sequences $$$[1,2], [4,2,1,3]$$$ are permutations, but $$$[0], [1,3], [2,1,2,4]$$$ – are not.
The first line contains a single integer $$$n(1 \leq n \lt 10^6)$$$, (n is odd).
The second line contains $$$n$$$ space separated integers $$$a_1, a_2, ..., a_n$$$$$$(0 \leq a_i \leq 2\cdot10^6)$$$.
Output "YES"(without quotes) if the array can be transformed into a permutation, and "NO"(without quotes) otherwise.
You can output "YES" or "NO" in any case.(For example, strings "yES", "yes" and "Yes" will be recognized as a positive response).
1 3
YES
3 1 2 3
YES
51 2 3 4 800
NO
5 0 1 2 7 6
YES