| acmsguru |
|---|
| Finished |
,
). Next m lines describe the edges of the graph. Each line consists of four numbers ai, bi, di,1, di,2, where ai and bi are the ends of the egde e and di,1=ω(e,ai), di,2=ω(e,bi); 1 ≤ ai, bi ≤ n, di,j ∈ {-1, 1}.NO" (quotes for clarity only). Otherwise, the first line should contain string "
YES", the second line should contain the number of elementary transformations in your solution, and the following lines should describe those transformations. Each transformation should be described by exactly one number — the index of the vertex of this transformation. If there are several answers with the minimal number of transformations, output any of them.
sample input | sample output |
4 3 1 3 -1 -1 2 3 -1 -1 3 4 1 1 | YES 1 3 |
sample input | sample output |
3 3 1 2 1 1 2 3 1 1 1 3 1 1 | NO |
| Name |
|---|


