Question :
Note that -flower and -flower do not exist, since at least vertices are needed to form a cycle.
Vlad really liked the structure of the -flowers and now he wants to find out if he was lucky to take one of them from the flowerbed.
The first line of input contains the single integer () — the number of test cases in the test.
The descriptions of the cases follow. An empty string is written before each case.
The first line of each case contains two integers and (, ) — the number of vertices and edges in the graph, respectively.
The next lines contain two integers each and (, ) — numbers of vertices connected by an edge. It is guaranteed that the graph does not contain multiple edges and self-loops.
It is guaranteed that the sum of over all test cases does not exceed . It is also guaranteed for the sum of over all test cases.
Output lines, each of which is the answer to the corresponding test case. As an answer, output "YES" if Vlad's graph is a -flower for some , and "NO" otherwise.
You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer).
59 121 23 12 31 64 16 43 83 55 89 72 97 28 121 23 12 31 64 16 43 83 55 88 72 87 24 31 24 23 16 86 36 45 35 23 23 12 12 45 72 42 53 43 54 14 51 5
YES NO NO NO NO
42 11 28 91 28 48 26 46 54 73 23 72 59 122 92 86 96 86 56 19 89 39 18 38 75 73 31 21 32 3
NO NO NO NO