410489: GYM104027 B Candies
Description
Master Yi, Mao mao and zyw are good friends. Today they received some candies feed from Mao mao's girlfriend. There are a total of $$$n$$$ packs of candies, and each pack contains $$$2$$$ or $$$3$$$ candies. Now zyw wants to test you, is there a division scheme so that all of them get the same amount of candies. Note that the entire package of candy cannot be taken apart for distribution.
InputThe first line of the input contains a single integer $$$T\ (1\le T\le 100)$$$ — the number of test cases. The description of test cases follows.
The first line of each test case contains the integer $$$n\ (1\le n\le 100)$$$ — the length of the packs of candies.
Then a single line follows, containing $$$n$$$ integers describing the array $$$a\ (2\le a_i\le 3)$$$ — the number of candies in each pack.
OutputFor each test case output YES if all of them could get the same number of candies, or NO if no division satisfy the conditions.
ExampleInput3 3 2 3 3 4 2 2 2 3 8 2 3 2 2 2 2 3 2Output
NO NO YES