Jack's Socks

No attempts yetTime limit1sMemory limit512 MB

Problem

Jack is a scientist, which means he does not pay much attention to what he wears. He does not know the names of more than six colors and cannot tell subtly different shades apart. Today he is leaving for a conference, and he has just pulled a heap of unpaired socks out of the washing machine and must pair them up.

Jack can tell whether two socks look similar, and he is only willing to put two socks together as a pair if they seem similar to him. However, the similarity relation is not necessarily transitive: Jack may find sock A similar to B and B similar to C, yet be able to tell A and C apart and consider them not similar.

Jack wants to know whether there is exactly one way to pair up all of his socks so that every pair consists of two similar socks. Write a program that decides this and, when the pairing is unique, prints it.

Input

The first line contains a positive integer Z50Z \le 50, the number of test cases. Then ZZ test cases follow.

The first line of each test case contains two integers nn and mm, separated by a single space (1n10001 \le n \le 1000, 0m100000 \le m \le 10000). nn is even and is the number of socks, which are numbered from 11 to nn. Each of the next mm lines contains two different integers aia_i and bib_i (aibia_i \ne b_i), separated by a single space, meaning that socks aia_i and bib_i are similar. Every similar pair is listed exactly once: if (ai,bi)(a_i, b_i) appears, then neither (ai,bi)(a_i, b_i) nor (bi,ai)(b_i, a_i) appears again.

Output

For each test case, decide whether there is exactly one way to pair all of the socks so that each pair consists of two similar socks.

If there is no such pairing, or more than one, print a single line containing NO.

Otherwise print YES on the first line, followed by n/2n/2 lines describing the unique pairing. Each line contains one pair c dc\ d with c<dc < d, and the pairs must be sorted in increasing order of their first element: for any two consecutive pairs (c,d)(c, d) and (e,f)(e, f), c<ec < e.