Bond

No attempts yetTime limit1sMemory limit128 MB

Problem

Tom is a chemist who is interested in molecular structure. He recently discovered a new kind of atom and named it a tomatom. When two or more tomatoms are joined by bonds they form a molecule called a tomolecule. In chemistry, the valency of an atom is the number of bonds that join it to its neighbors. The tomatoms in a tomolecule are joined so that all of the following hold:

  1. Every tomatom is joined by at least one bond, and there may be more than one bond between the same pair of tomatoms.
  2. The tomolecule is connected: between every two tomatoms there is a path made of bonds, so there are no isolated pieces.
  3. No tomatom is bonded to itself.

Tom wants to study the valencies in a tomolecule. Given a list of positive integers, he wants to know whether some tomolecule can have exactly those integers as the valencies of its tomatoms while satisfying the three conditions above.

For example, suppose three tomatoms have target valencies 50, 60, and 70; call them A1A_1, A2A_2, and A3A_3. If there are 20 bonds between A1A_1 and A2A_2, 30 bonds between A1A_1 and A3A_3, and 40 bonds between A2A_2 and A3A_3, then the valencies of A1A_1, A2A_2, A3A_3 are 50, 60, 70, so a matching tomolecule exists. For the integers 10, 20, 40 no such tomolecule exists. For four tomatoms with valencies 1, 1, 1, 1 there is also no tomolecule, because condition (2) cannot be satisfied.

Write a program that, given the positive integers, decides whether a tomolecule whose tomatom valencies are exactly those integers, and that satisfies the conditions above, can exist.

Input

The input is read from standard input. The first line contains the number of test cases TT. Each test case is given on two lines. The first line contains an integer NN, the number of tomatoms, with 2N2002 \le N \le 200. The second line contains NN nondecreasing positive integers; the kk-th of them is the valency of tomatom AkA_k (for 1kN1 \le k \le N). The integers are separated by single spaces, and each integer is between 1 and 10000, inclusive.

Output

The output is written to standard output. For each test case, print a single line containing YES if some tomolecule can have exactly the given integers as the valencies of its tomatoms while satisfying all three conditions, and NO otherwise.