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:
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.
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 .
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.
81 88 75 42 87 84 86 65
157 150 164 119 79 159 161 139 158