You are given a simple undirected unweighted graph, consisting of $N$ vertices and $M$ edges.
The $i$-th edge is between vertex $a_ i$ and vertex $b_ i$.
A graph is chordal if it does not have an induced cycle of length four or more.
A perfect elimination ordering is an ordering of the vertices such that for every vertex $v$, $v$ and the neighbors of $v$ that appear after it in the ordering form a clique.
It can be shown that a graph is chordal if and only if it has a perfect elimination ordering.
If the graph is chordal, find a perfect elimination ordering. If there are multiple perfect elimination orderings, print any of them.
If the graph is not chordal, find an induced cycle of length four or more. If there are multiple such cycles, print any of them.
$N$ $M$
$a_ 0$ $b_ 0$
$a_ 1$ $b_ 1$
$a_ 2$ $b_ 2$
$\vdots$
$a_ {M - 1}$ $b_ {M - 1}$
If the graph is not chordal, output an induced cycle of length four or more in the following format.
NO
$K$
$c_ 0$ $c_ 1$ $\ldots$ $c_ K$
$K$ represents length of the induced cycle.
$c_ i$ is the $i$-th vertex in the cycle.
If the graph is chordal, output a perfect elimination ordering in the following format.
YES
$v_ 0$ $v_ 1$ $\ldots$ $v_ N$
$v_ i$ is the $i$-th vertex in the perfect elimination ordering.
4 4 1 3 0 3 1 2 0 1
YES 2 0 1 3
5 4 0 2 1 3 0 1 3 2
NO 4 1 3 2 0
10 15 0 1 1 2 2 3 3 4 4 0 5 6 6 7 7 8 8 9 9 5 0 5 1 7 2 9 3 6 4 8
NO 5 6 3 2 9 5
| No. | Testdata Range | Score |
|---|