- All Contests
- ProjectEuler+
- Project Euler #105: Special subset sums: testing

# Project Euler #105: Special subset sums: testing

# Project Euler #105: Special subset sums: testing

_{This problem is a programming version of Problem 105 from projecteuler.net}

Let represent the sum of elements in set of size . We shall call it a special sum set if for any two non-empty disjoint subsets, and , the following properties are true:

- ; that is, sums of subsets cannot be equal.
- If contains more elements than then .

For example, is not a special sum set because , whereas satisfies both rules for all possible subset pair combinations.

Your task is to determine whether the given set is a special sum set.

**Input Format**

First line contains an integer denoting the number of test cases.

Each test case consists of two lines. First of them contains the only integer - the size of the set. Second line contains integers .

**Constraints**

**Output Format**

For each of test cases print one line containing a single word YES, if the given set is a special sum set, and NO otherwise.

**Sample Input**

```
2
8
81 88 75 42 87 84 86 65
9
157 150 164 119 79 159 161 139 158
```

**Sample Output**

```
NO
YES
```