Edward has 2`n` points on the plane conveniently labeled with 1,2,…,2`n`. Each point is connected exactly with another point by a segment.

Edward finds that some segments intersecting with some others. So he wants to eliminate those intersections with the following operation: choose two points `i` and `j` (1 ≤ `i`, `j` ≤ 2`n`) and swap their coordinates.

For example, Edward has 4 points (0, 0), (0, 1), (1, 1), (1, 0). Point 1 is connected with point 3 and point 2 is connected with 4. Edward can choose to swap the coordinates of point 2 and point 3.

Edward wants to know whether it is possible to use at most `n` + 10 operations to achieve his goal.

No two points coincide and no three points are on the same line.

There are multiple test cases. The first line of input contains an integer `T` indicating the number of test cases. For each test case:

The first line contains an integer `n` (1 ≤ `n` ≤ 100000).

Each of the following 2`n` lines contains 2 integers `x`_{i}, `y`_{i} which denotes the point (`x`_{i}, `y`_{i}). (|`x`_{i}|, |`y`_{i}| ≤ 10^{9}).

Each of the following `n` lines contains 2 integers `a`_{i}, `b`_{i} (1 ≤ `a`_{i}, `b`_{i} ≤ 2`n`, `a`_{i} ≠ `b`_{i}), which means point `a`_{i} and point `b`_{i} are connected by a segment.

The sum of values `n` for all the test cases does not exceed 300000.

For each test case, print a line containing an integer `m`, indicating the number of operations needed. You must assure that `m` is no larger than `n` + 10. If you cannot find such a solution, just output "-1" and ignore the following output.

In the next `m` lines, each contains two integers `i` and `j` (1 ≤ `i`, `j` ≤ 2`n`), indicating an operation, separated by one space.

If there are multiple solutions, any of them is accepted.

提交代码