##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
| # | Title | Points | Solved | Admin | |
|---|---|---|---|---|---|
You are given a complete graph with vertices, numbered from to .
A is a simple path with distinct vertices and edges. For example, the path uses the edges , , and .
Determine whether it is possible to divide all edges of the complete graph into some paths, so that every edge belongs to exactly one path.
If it is possible, output one valid division. Using zero paths is allowed.
For each test case, first print Yes if it is possible, or No otherwise.
If it is possible, print an integer on the next line, the number of paths.
Then print lines. Each line must contain four distinct integers , , , and , denoting the path . If , print no path lines.
Every edge of the complete graph must appear in exactly one printed path.
For , there are no edges, so zero paths are enough.
For , the graph has only one edge, so it cannot be divided into paths with three edges.
For , it is impossible since a needs four distinct vertices.
For , the two printed paths use all six edges exactly once.
For , the five printed paths use all fifteen edges exactly once.