Stepan and Matches
Stepan has a fascination with matches, but he uses them for solving puzzles rather than starting fires. For instance, he can transform the number nine into eleven by moving just one match. Recently, his parents gifted him several sets of matches, each containing twelve. Stepan has been busy creating various geometric shapes with them. Now, he's curious to know if he can construct the frame of a parallelepiped using exactly twelve matches from each set, without breaking any matches or having them extend beyond the frame.
Your task is to determine if it's possible to assemble the frame of a parallelepiped using the matches from each set, given their lengths.
Input
The first line of the input contains a single integer N (1 ≤ N ≤ 100), indicating the number of match sets. Each of the following N lines describes a set of matches with twelve positive integers, each not exceeding 10^9.
Output
The output should consist of N lines. For each set of matches, print "yes" if it is possible to construct the frame of a parallelepiped, and "no" if it is not.