Jecka is making a choose-your-own-adventure game. In this genre of video games, there are multiple scenes each with a choice between two different options that lead to different scenes, called choice scenes. There are also ending scenes: scenes that do not have any options. To make her life easier, Jecka represents each scene with a unique integer ID from to
.
Since Jecka wants to make sure her playerbase is entertained by the game, she needs to fulfill their requirements of the game. Specifically, they will only enjoy a game that has exactly endings and
non-ending scenes. So, she looks to you to help her design such a game!
Jecka is an organized person, so she wants the IDs of the scenes to satisfy the following rules:
- Scene
must be the starting scene; that is, there may not be any choice scenes that lead to it
- Scenes
to
must be choice scenes
- Scenes
to
must be ending scenes
Additionally, all scenes must be reachable from scene (for completeness!) and no choice scene can have itself as an option (that's boring!).
Can you help her craft a game that follows these requirements?
Constraints
Input Specification
The first line will contain two integers, and
, the number of choice scenes and ending scenes required, respectively.
Output Specification
Output lines, each line
containing two integers denoting the ID of the scenes that can be reached from scene
. If it is not possible to make a game that fulfills the audience's requirements, output
-1
. If there are multiple possible arrangements, output any.
Sample Input 1
1 4
Sample Output 1
-1
Explanation for Sample 1
It is not possible to create a game that has endings but only
non-ending scene.
Sample Input 2
2 2
Sample Output 2
2 3
3 4
Explanation for Sample 2
The graph looks like this:
Scenes and
are endings while
and
are choice scenes.
Comments