Statement
You are given a positive integer and nonnegative integers , .
Determine whether there exists a simple undirected graph with vertices satisfying all of the following conditions. If one exists, construct any such graph. Note that does not have to be connected.
- For every (), the degree of vertex is .
Definition of a simple graph
A simple graph has no self-loops and has at most one edge between any two distinct vertices.
Input
The input is given from Standard Input in the following format:
Output
If no simple undirected graph satisfies the conditions, print on the first line.
If such a graph exists, print it in the following format:
Constraints
- .
- ().