Grafp

Once upon a time there was this harmonious group of people called Comisia. Comisia was preparing a programming contest for some of the best finalists in the country. Everything was beautiful and the land was as prosperous as ever. All of a sudden drought and disease hit the land. It was the curse of the evil wizard Petru, whose sole purpose in life was to poison the problems that Comisia was creating for the contest. In order to break this terrible curse you must solve this problem...
You are given three numbers: k, n, m. Generate an undirected graph with k nodes which contains at least a connected component with n nodes in the initial graph and at least one connected component with m nodes in the complementary one.

Input

k, n, and m on the only line .

Output

The first line will contain the number of pairs. On the next lines display the pairs of numbers (a,b). One pair on a separate line of the file.(a,b) meaning that there is an edge from a to b in the initial graph. If there is no solution print -1.

Constraints

1 ≤ k, n, m ≤ 100
1 ≤ n, m ≤ k
You are not allowed to display an edge from one node to the same node.
If there are several solutions you can print any of them
In graph theory, the complement or inverse of a graph G is a graph H on the same vertices such that two distinct vertices of H are adjacent if and only if they are not adjacent in G.

Sample

InputOutput
2 1 1 -1
2 2 1 1
1 2
Questions?

Sponsors Gold