PROGRAMMING:Hamilton Tour
The famous "Hamilton loop problem" is to find a simple loop that can traverse all the vertices in a graph (that is, each vertex is visited only once). This problem requires you to judge whether any given circuit is Hamilton circuit.
###Input format:
First, the first line gives two positive integers: vertex number $$n $$($$2 < n / Le 200 $$) and edge number $$M $$. This is followed by the $$M $$lines, each of which gives two endpoints of an edge in the format "vertex 1 Vertex 2", where the vertices are numbered from 1 to $$n $. The next line gives a positive integer, $$k $$, which is the number of circuits to be tested. Next, there are $$k $$lines, and each line gives a circuit to be inspected in the following format:
$$n$$ $$V_ 1$$ $$V_ 2$$ $$\cdots$$ $$V_ n$$
Where $$n $$is the number of vertices in the loop, $$V_ I $$is the vertex number on the path.
###Output format:
For each circuit to be inspected, if it is Hamilton circuit, output "yes" in one line, otherwise output "no".
###Input example:
```in
6 10
6 2
3 4
1 5
2 5
3 1
4 1
1 6
6 3
1 2
4 5
six
7 5 1 4 3 6 2 5
6 5 1 4 3 6 2
9 6 2 1 6 3 4 5 2 6
4 1 2 5 1
7 6 1 3 4 5 2 6
7 6 1 2 5 4 3 1
```
###Output example:
```out
YES
NO
NO
NO
YES
NO
```
answer:If there is no answer, please comment
###Input format:
First, the first line gives two positive integers: vertex number $$n $$($$2 < n / Le 200 $$) and edge number $$M $$. This is followed by the $$M $$lines, each of which gives two endpoints of an edge in the format "vertex 1 Vertex 2", where the vertices are numbered from 1 to $$n $. The next line gives a positive integer, $$k $$, which is the number of circuits to be tested. Next, there are $$k $$lines, and each line gives a circuit to be inspected in the following format:
$$n$$ $$V_ 1$$ $$V_ 2$$ $$\cdots$$ $$V_ n$$
Where $$n $$is the number of vertices in the loop, $$V_ I $$is the vertex number on the path.
###Output format:
For each circuit to be inspected, if it is Hamilton circuit, output "yes" in one line, otherwise output "no".
###Input example:
```in
6 10
6 2
3 4
1 5
2 5
3 1
4 1
1 6
6 3
1 2
4 5
six
7 5 1 4 3 6 2 5
6 5 1 4 3 6 2
9 6 2 1 6 3 4 5 2 6
4 1 2 5 1
7 6 1 3 4 5 2 6
7 6 1 2 5 4 3 1
```
###Output example:
```out
YES
NO
NO
NO
YES
NO
```
answer:If there is no answer, please comment