Consider a complete graph with N vertices. Find K spanning trees that are edge-disjoint.



The leftmost figure above shows a complete graph with four vertices. The two figures to the right are two edge-disjoint spanning trees of this graph.
You are given two integers N and K on a single line (2≤N≤104, 1≤K≤100).
If there is no tuple of K spanning trees that satisfies the conditions, print −1.
Otherwise, print K spanning trees. Each spanning tree must be printed on N−1 lines. The i-th line must contain two space-separated integers: the two endpoints of the i-th edge. The vertices are numbered 1 through N. You may print an empty line between consecutive trees.