CF605B Lazy Student

Description

Student Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange algorithm on a graph — something that will definitely never be useful in real life. He asked a girl sitting next to him to lend him some cheat papers for this questions and found there the following definition: The minimum spanning tree $ T $ of graph $ G $ is such a tree that it contains all the vertices of the original graph $ G $ , and the sum of the weights of its edges is the minimum possible among all such trees. Vladislav drew a graph with $ n $ vertices and $ m $ edges containing no loops and multiple edges. He found one of its minimum spanning trees and then wrote for each edge its weight and whether it is included in the found tree or not. Unfortunately, the piece of paper where the graph was painted is gone and the teacher is getting very angry and demands to see the original graph. Help Vladislav come up with a graph so that the information about the minimum spanning tree remains correct.

Input Format

The first line of the input contains two integers $ n $ and $ m $ (![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF605B/df61e7c46cc76d2c3442179294330a9dccb8c123.png)) — the number of vertices and the number of edges in the graph. Each of the next $ m $ lines describes an edge of the graph and consists of two integers $ a_{j} $ and $ b_{j} $ ( $ 1

Output Format

If Vladislav has made a mistake and such graph doesn't exist, print $ -1 $ . Otherwise print $ m $ lines. On the $ j $ -th line print a pair of vertices $ (u_{j},v_{j}) $ ( $ 1