CF550D Regular Bridge
Description
An undirected graph is called $ k $ -regular, if the degrees of all its vertices are equal $ k $ . An edge of a connected graph is called a bridge, if after removing it the graph is being split into two connected components.
Build a connected undirected $ k $ -regular graph containing at least one bridge, or else state that such graph doesn't exist.
Input Format
The single line of the input contains integer $ k $ ( $ 1
Output Format
Print "NO" (without quotes), if such graph doesn't exist.
Otherwise, print "YES" in the first line and the description of any suitable graph in the next lines.
The description of the made graph must start with numbers $ n $ and $ m $ — the number of vertices and edges respectively.
Each of the next $ m $ lines must contain two integers, $ a $ and $ b $ ( $ 1
Explanation/Hint
In the sample from the statement there is a suitable graph consisting of two vertices, connected by a single edge.