1254: Simple学长的礼物

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:285 解决:52

题目描述

The Christmas Eve is coming,so simple has bought n apples for his two friends. Now he wants to divide all the apples between the friends. Each apple weights 100 grams or 200 grams.Of course Simple doesn't want to make any of his friend unhappy. Therefore the total weight of the apples given to his friends must be equal. But unfortunately Simple doesn't have a knife,so he cannot split any apple into some parts. Please, tell him: is it possible to divide all the apples in a fair way between his friends?

输入

The first T indicates there are T groups of date.

The first line of every group contains an integer n (1 <= n <= 100) — the number of apples. The second line contains n integers w1, w2, ..., wn (wi = 100or wi = 200), where wi is the weight of the i-th apple.

输出

In a single line print "YES" (without the quotes) if it is possible to divide all the apples between his friends. Otherwise print "NO" (without the quotes).

样例输入 复制

2
3
100 200 100
4
100 100 100 200

样例输出 复制

YES
NO

来源/分类