In a hidden region of the Bermuda Triangle, people make everything they need in the shape of triangles. One day someone decided to break the rule and baked a cake shaped like a regular hexagon. As usual, though, the cake has to be served in triangular pieces. Every piece is an equilateral triangle, and different people receive pieces of different sizes. He may use as many triangular pieces as he needs, and the whole cake must be cut into these pieces so that nothing is left over.
For example, the figure below shows one way a regular hexagon of side 9 can be cut into equilateral triangles of side 2 and side 3. (The cake is cut along the thick lines; the thin lines are drawn only to show the sizes.)

Given the side length of a regular hexagon and a set of allowed triangle sizes (each described by its side length), decide whether the hexagon can be completely divided into equilateral triangles whose side lengths all come from the given set. Each allowed size may be used any number of times, including zero.
The first line contains a single integer t (1≤t≤10), the number of test cases. Each of the next t lines describes one test case. A line begins with s (1≤s≤25), the side length of the hexagon, followed by n (1≤n≤10), the number of triangle types, followed by n integers giving the side length of each triangle type (each between 1 and 25, inclusive).
For each test case, output a single line containing YES if the hexagon can be completely divided using the given triangle types, or NO otherwise.