MathModel wants to give IceCream a string consisting of digits (0-9) for his birthday.
IceCream hates the meme. Therefore, he refuses to look at any string that contains "67" or "76" as a subsequence.
Please help MathModel determine if there exists a way to permute the string such that it does not contain "67" nor "76" as a subsequence.
A : ATTENTION !! : This is very important , on honor of the writer of this round , the problem is intended to be non trivial and related to the 67 meme , therefore you're asked to print if it's possible to obtain 67 by some subsequence or not.
A Subsequence: A sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements. For example, "67" is a subsequence of "687" but is not a subsequence of "765".
A Permutation: A string is a permutation of if it contains the same characters as with the same frequencies, but possibly in a different order.
The first line contains (1 \le t \le 1000) — the number of test cases
The first line of each test case contains single integer (1 \le n \le 100) — the length of string .
The second line of each test case contains single string (s_i \in \{\mathtt{0,1,2,3,4,5,6,7,8,9} \})
For each test case , print "YES" if it is possible to permute to satisfy the condition ; otherwise, print "NO".
You can output the answer in any case (For example, the strings "yEs", "yes", "Yes", and "YeS" will be recognized as positive responses).
Example 1
Subtask ( points): No additional constraints