{"trustable":true,"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e给你$$$4n$$$根棍子,第$$$i$$$根棍子的长度是$$$a_i$$$。\u003c/p\u003e\u003cp\u003e你需要创建$$$n$$$个矩形,每个矩形由给定的$$$4$$$根棍子组成。每个矩形由四条边组成,对边长度相等,且所有角均为直角。注意每根棍子只能用一次。每根棍子必须用作一条边,不能折断或不使用完整长度。\u003c/p\u003e\u003cp\u003e你希望所有矩形的面积相等。边长为$$$a$$$和$$$b$$$的矩形的面积为$$$a \\cdot b$$$。\u003c/p\u003e\u003cp\u003e你的任务是判断是否可能创建$$$n$$$个面积相等的矩形。\u003c/p\u003e\u003cp\u003e你需要回答$$$q$$$个独立的查询。\u003c/p\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e输入的第一行包含一个整数$$$q$$$($$$1 \\le q \\le 500$$$)— 查询的数量。接下来是$$$q$$$个查询。\u003c/p\u003e\u003cp\u003e每个查询的第一行包含一个整数$$$n$$$($$$1 \\le n \\le 100$$$)— 矩形的数量。\u003c/p\u003e\u003cp\u003e查询的第二行包含$$$4n$$$个整数$$$a_1, a_2, \\dots, a_{4n}$$$($$$1 \\le a_i \\le 10^4$$$),其中$$$a_i$$$是第$$$i$$$根棍子的长度。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e对于每个查询,输出答案。如果无法使用给定的棍子创建$$$n$$$个面积相等的矩形,则输出\"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e\"。否则输出\"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\"。\u003c/p\u003e"}},{"title":"示例","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\n1\n1 1 10 10\n2\n10 5 2 10 1 1 2 5\n2\n10 5 1 10 5 1 1 1\n2\n1 1 1 1 1 1 1 1\n1\n10000 10000 10000 10000\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\nYES\nNO\nYES\nYES\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}