Bessie is learning to code using a simple programming language. She first defines a valid program, then executes it to produce some output sequence.
Defining:
Executing:
An example of a program that Bessie knows how to write is as follows.
REP 3
PRINT 1
REP 2
PRINT 2
END
END
The program outputs the sequence $[1,2,2,1,2,2,1,2,2]$.
Bessie wants to output a sequence of $N$ ($1 \le N \le 100$) positive integers. Elsie challenges her to use no more than $K$ ($1 \le K \le 3$) "PRINT" statements. Note that Bessie can use as many "REP" statements as she wants. Also note that each positive integer in the sequence is no greater than $K$.
For each of $T$ ($1 \le T \le 100$) independent test cases, determine whether Bessie can write a program that outputs some given sequence using at most $K$ "PRINT" statements.
The first line contains $T$.
The first line of each test case contains two space-separated integers, $N$ and $K$.
The second line of each test case contains a sequence of $N$ space-separated positive integers, each at most $K$, which is the sequence that Bessie wants to produce.
For each test case, output "YES" or "NO" (case sensitive) on a separate line.