P2383 Gou-ge Plays with Sticks

Background

Gou-ge is once again doing something boring during Chinese class...

Description

Given some stick lengths, can Gou-ge use all the given sticks (all sticks must be used) to form a square?

Input Format

The first line of the input file is an integer $n(1\le n\le 10)$ indicating the number of test groups. The following $n$ lines describe each group's testdata. In each line, the first number is $m(4\leq m\leq 20)$, followed by $m$ numbers $a_i(1\leq a_i\le 2000)$ representing the lengths of the sticks.

Output Format

For each group's testdata, output "yes" if it is possible to form a square, otherwise output "no".

Explanation/Hint

Gou-ge is about to go crazy. Translated by ChatGPT 5