#P2383. 狗哥玩木棒

狗哥玩木棒

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(1n10)n(1\le n\le 10) indicating the number of test groups. The following nn lines describe each group's testdata. In each line, the first number is m(4m20)m(4\leq m\leq 20), followed by mm numbers ai(1ai2000)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".

3
4 1 1 1 1 
5 10 20 30 40 50 
8 1 7 2 6 4 4 3 5
yes
no
yes

Hint

Gou-ge is about to go crazy.

Translated by ChatGPT 5