Since Judge Nicole Hosh moved to Egypt for her Computer Science Masters in AASTMT, in 2014, she has been training with coach Fegla and attending his camps in Egypt. She, also, set a number of problems for TCPC and JCPC and was a judge in LCPC and SCPC. Her best friend Noura was so proud of her so she was trying to convince her to start writing Codeforces Div. 2 round. After various attempts to convince her, Nicole finally agreed, and so, she started collecting some problems with different difficulties from her ex-contestant friends.
Judge Nicole collected 7 ideas for problems of different levels, she wants to create 5 problems for the next contest, one for each difficulty level, from A to E (difficulty 1 to 5). Given the difficulty level of the problems she currently has, she can merge the ideas of two problems, one of level x, and the other of level y to get a problem of level x + y.
For example, Judge Nicole can merge two problems of difficulties A and D, to get one problem of difficulty E (1 + 4 = 5).
Merging more than two problems into one will produce a problem with a long statement which is hard to explain, so she won’t do this (i.e., each problem is merged with another at most once). Also, she can’t merge a resultant problem again, and she can't use the same problem twice.
The first line of input contains an integer T (1 ≤ T ≤ 330), the number of test cases.
Each test case will contain only one string S of length 7. Each letter of the string represents the difficulty level of a problem (from A to E), 'A' is the easiest and 'E' is the hardest.
For each test case print "YES" if she can prepare a contest using the current problems, otherwise print "NO".
Warning: large Input/Output data, be careful with certain languages.
## Input
The first line of input contains an integer T (1 ≤ T ≤ 330), the number of test cases.Each test case will contain only one string S of length 7. Each letter of the string represents the difficulty level of a problem (from A to E), 'A' is the easiest and 'E' is the hardest.
## Output
For each test case print "YES" if she can prepare a contest using the current problems, otherwise print "NO".
[samples]
## Note
Warning: large Input/Output data, be careful with certain languages.
**Definitions**
Let $ T \in \mathbb{Z} $ be the number of test cases.
For each test case, let $ S \in \{A, B, C, D, E\}^7 $ be a string of length 7, where each character represents the difficulty level of a collected problem:
- $ A \leftrightarrow 1 $, $ B \leftrightarrow 2 $, $ C \leftrightarrow 3 $, $ D \leftrightarrow 4 $, $ E \leftrightarrow 5 $.
Let $ c_i \in \mathbb{Z}_{\geq 0} $ denote the count of problems with difficulty $ i \in \{1, 2, 3, 4, 5\} $ in $ S $.
**Constraints**
1. $ 1 \leq T \leq 330 $
2. For each test case, $ \sum_{i=1}^{5} c_i = 7 $
**Objective**
Determine whether there exists a subset of distinct problem pairs (each used at most once) such that merging some pairs produces exactly one problem of each difficulty level $ \{1, 2, 3, 4, 5\} $, where:
- A problem of difficulty $ i $ can be used *as-is* (no merge), or
- Two problems of difficulties $ x $ and $ y $ can be merged to produce a problem of difficulty $ x + y $, with $ x + y \leq 5 $, and $ x \neq y $ or $ x = y $ only if $ 2x \leq 5 $.
Each problem may be used in at most one merge (or as a standalone), and no merged problem may be merged again.
**Output**
Print "YES" if such a selection exists; otherwise, print "NO".