Problem C. Find the visible lines

Problem

Given a set of lines in 2D space, determine which lines are visible when viewed downward from y = infinity.

Example

L1, L3 and L4 are visible but not L2 when viewed downward from y = infinity.

Input

The input will contain an integer N indicating the number of test cases, where 0 < N <= 20. Each test case starts with an integer M, indicating the number of lines in the test case, where 0 < M < 100000. M lines of input then follows, each has two integers m and c, describing a line in the slope intersect form y = mx + c. The values for m and c are bounded by a 32 bit signed integer in C. There will be no vertical lines and no more than two lines intersect at the same point.

Output

Output the lines that are visible. If the i-th line in the test case is visible, then output one line of integers m and c of the i-th line. The output should be sorted first by m then c. Print an empty line after each test case.

Sample input

2
2
1 0
-1 0
2
0 4
0 2

Sample Output

-1 0
1 0

0 4