{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eAlice and Bob received $$$n$$$ candies from their parents. \u003cspan class\u003d\"tex-font-style-bf\"\u003eEach candy weighs either 1 gram or 2 grams\u003c/span\u003e. Now they want to divide all candies among themselves fairly so that the total weight of Alice\u0027s candies is equal to the total weight of Bob\u0027s candies.\u003c/p\u003e\u003cp\u003eCheck if they can do that.\u003c/p\u003e\u003cp\u003eNote that candies \u003cspan class\u003d\"tex-font-style-bf\"\u003eare not allowed to be cut in half\u003c/span\u003e.\u003c/p\u003e\n爱丽丝和鲍勃从父母那里得到了 $n$ 粒糖果。每颗糖果重 $1$ 克或 $2$ 克。现在他们想公平地分配所有糖果,使爱丽丝的糖果总重量等于鲍勃的糖果总重量。\n\n看看他们能否做到。\n\n注意,糖果不能切成两半。"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains one integer $$$t$$$ ($$$1 \\le t \\le 10^4$$$)\u0026nbsp;— the number of test cases. Then $$$t$$$ test cases follow.\u003c/p\u003e\u003cp\u003eThe first line of each test case contains an integer $$$n$$$ ($$$1 \\le n \\le 100$$$)\u0026nbsp;— the number of candies that Alice and Bob received.\u003c/p\u003e\u003cp\u003eThe next line contains $$$n$$$ integers $$$a_1, a_2, \\ldots, a_n$$$\u0026nbsp;— the weights of the candies. The weight of each candy is either $$$1$$$ or $$$2$$$.\u003c/p\u003e\u003cp\u003eIt is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^5$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output on a separate line: \u003c/p\u003e\u003cul\u003e \u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\", if all candies can be divided into two sets with the same weight; \u003c/li\u003e\u003cli\u003e \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e\" otherwise. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eYou can output \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e\" in any case (for example, the strings \u003cspan class\u003d\"tex-font-style-tt\"\u003eyEs\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003eyes\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003eYes\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e will be recognized as positive).\u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n2\n1 1\n2\n1 2\n4\n1 2 1 2\n3\n2 2 2\n3\n2 1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\nNO\nYES\nNO\nNO\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first test case, Alice and Bob can each take one candy, then both will have a total weight of $$$1$$$.\u003c/p\u003e\u003cp\u003eIn the second test case, any division will be unfair.\u003c/p\u003e\u003cp\u003eIn the third test case, both Alice and Bob can take two candies, one of weight $$$1$$$ and one of weight $$$2$$$.\u003c/p\u003e\u003cp\u003eIn the fourth test case, it is impossible to divide three identical candies between two people.\u003c/p\u003e\u003cp\u003eIn the fifth test case, any division will also be unfair.\u003c/p\u003e"}}]}