Lines

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

You are given nn lines on a plane. Your task is to select the maximum possible number of lines so that among the selected ones, no two lines are the same, no two lines are parallel and no two lines have an intersection at a point with x=0x = 0.

입력

The first line of input contains one positive integer TT, the number of test cases. The test cases follow.

Each test case starts with a line containing an integer nn, the number of lines (1n30001 \le n \le 3000). Each of the next nn lines of input contain three integers AA, BB and CC describing a line as a set of points (x,y)(x, y) for which the equation Ax+By+C=0A x + B y + C = 0 holds (109A,B,C109-10^9 \le A, B, C \le 10^9, A2+B2>0A^2 + B^2 > 0).

The sum of nn in the input does not exceed 30003000.

출력

For each test case, first, on a separate line, print the number kk: the maximum possible number of lines that can be selected. On the next line, print kk integers: the numbers of the chosen lines in any order. The lines are numbered starting from 11 in the order they are given in the input.

If there are several optimal answers, print any one of them.