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.
The first line contains a positive integer Z≤50, the number of test cases. Then Z test cases follow.
The first line of each test case contains two integers n and m, separated by a single space (1≤n≤1000, 0≤m≤10000). n is even and is the number of socks, which are numbered from 1 to n. Each of the next m lines contains two different integers ai and bi (ai=bi), separated by a single space, meaning that socks ai and bi are similar. Every similar pair is listed exactly once: if (ai,bi) appears, then neither (ai,bi) nor (bi,ai) appears again.
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/2 lines describing the unique pairing. Each line contains one pair c d with c<d, and the pairs must be sorted in increasing order of their first element: for any two consecutive pairs (c,d) and (e,f), c<e.