#P2383. 狗哥玩木棒

狗哥玩木棒

Background

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

Problem 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≤n≤10)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(4≤m≤20)m(4\leq m\leq 20), followed by mm numbers ai(1≤ai≤2000)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