#P3194. [HNOI2008] 水平可见直线

[HNOI2008] 水平可见直线

Description

On the xyx-y Cartesian coordinate plane, there are nn lines L1,L2,,LnL_1, L_2, \dots, L_n. If, when looking downward from y=+y = +\infty, some subsegment of LiL_i is visible, we say that LiL_i is visible; otherwise, LiL_i is covered. For example, for the lines: L1:y=xL_1: y = x; L2:y=xL_2: y = -x; L3:y=0L_3: y = 0; then L1L_1 and L2L_2 are visible, and L3L_3 is covered. Given nn lines in the form y=Ax+By = A x + B (A,B500000|A|, |B| \le 500000), and no two lines coincide, find all visible lines.

Input Format

The first line contains NN (0<N<500000 < N < 50000). The next NN lines each contain Ai,BiA_i, B_i.

Output Format

Output the indices of the visible lines in increasing order, separated by spaces. There must also be a space after the last number.

3
-1 0
1 0
0 0
1 2

Hint

Translated by ChatGPT 5