You are given an undirected connected graph with $$$n$$$ vertices and $$$m$$$ edges, where $$$m \le n + 9$$$.
Each edge of the graph must be colored with one of three colors numbered from $$$1$$$ to $$$3$$$. We say that vertices $$$u$$$ and $$$v$$$ are reachable in color $$$c$$$ if there exists a path from $$$u$$$ to $$$v$$$ consisting only of edges of color $$$c$$$.
Determine whether there exists a way to color the edges such that the following conditions are satisfied:
The first line contains one integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases.
Each test case begins with a line that contains two integers $$$n$$$ and $$$m$$$ ($$$2 \le n \le 3000$$$; $$$n - 1 \le m \le n + 9$$$) — the number of vertices and edges in the graph.
Each of the next $$$m$$$ lines of a test case contains two integers $$$u_i$$$ and $$$v_i$$$ ($$$1 \le u_i, v_i \le n$$$, $$$u_i \ne v_i$$$) — the endpoints of the $$$i$$$-th edge.
Additional constraints on the input:
For each test case, print the answer as follows: if such an edge coloring exists, print YES; otherwise, print NO. Each letter may be printed in any case.
44 61 22 33 11 42 43 43 31 22 33 17 91 22 33 11 44 55 11 66 77 15 81 22 33 44 15 15 25 35 4
YESNONOYES
In the first example, it's possible to paint the $$$5$$$-th edge in color $$$1$$$, the $$$1$$$-st and the $$$4$$$-th edge in color $$$2$$$, and all other edges in color $$$3$$$.
| Name |
|---|


