Yukikaze has non-intersecting intervals. She wants you to construct a set of intervals such that the intersection of them is the union of the
intervals that Yukikaze has. The intersection of the intervals is the set of integers that the intervals have in common.
The first line of the input contains a single integer, denoting the number of test cases.
The first line of each test case contains two integersand
, denoting that the ring consists of numbers from
to
.
Each of the next
lines contains two integers
, denoting an interval Yukikaze has. It's guaranteed that the
intervals won't intersect with each other.
For each test case, if the answer doesn't exist, outputin a line. Otherwise, output an integer
indicating the number of intervals you construct in a line. Then output the
intervals in
lines. The number of intervals you used should never be less than one or greater than
.
If there are multiple solutions, print any. Don't print any extra spaces at the end of each line.