Chef and Bipartite Graph
Chef is very interested in studying biparite graphs. Today he wants to construct a bipartite graph with vertices each, on the two parts, and with total number of edges equal to . The vertices on the left are numbered from to . And the vertices on the right are also numbered from to . He also wants the degree of every vertex to be greater than or equal to , and to be lesser than or equal to . ie. for all .
Given four integers you have to help Chef in constructing some bipartite graph satisfying this property. If there does not exist any such graph, output .
Input
First line contains the number of test cases .
The only line of each test case contains four integers , , .
Output
For each test case, output if there is no bipartite graph satisfying this property. Otherwise output lines, each of the lines should contain two integers denoting that there is an edge between vertex on the left part and vertex on the right part. If there can be multiple possible answers, you can print any. Note that the bipartite graph should not have multi-edges.