Problem1080--make up a square

1080: make up a square

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

Peter is given a list of N sticks whose length are positive integers, he just wants to know if he can use all of those sticks to make a square! He has to use all of them and cannot break any stick, each stick must be used exactly one time; but he can link the sticks up. 

Input

The fist line is an integer T which is the number of cases.  1 <= T <= 1000
The first line of each case is integer N   1<= N <= 15
The second line of each case are N integers which are the length of the sticks.  The length of stick is <= 100,000,000
 

Output

For each case, please output true or false, one case one line. 

Sample Input Copy

2
5
1 1 2 2 2
5
3 3 3 3 4

Sample Output Copy

true
false

Source/Category