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.
Definition of a simple graph
A simple graph has no self-loops and has at most one edge between any two distinct vertices.
The input is given from Standard Input in the following format:
If no simple undirected graph satisfies the conditions, print on the first line.
If such a graph exists, print it in the following format:
is the number of edges in the graph you output. For each (), the pair represents an edge joining vertices and . The printed edges must form a simple undirected graph satisfying all conditions in the statement.
If there are multiple solutions, print any of them.
| 2 | 83 | No additional constraints. |