Hungry Queen#3452

Hungry Queen

1 second
64 megabytes
Very hard

Consider an infinite chessboard with cells identified by pairs of integer numbers: (, ). The black queen is initially located at the cell (, ). The queen can move horizontally, vertically or diagonally, but cannot move downwards. That is, after each turn the -coordinate of the cell where the queen is after the turn must be greater than or equal to the -coordinate of the cell where it was before the turn.

There are white pawns on the board, located at cells (x_i, y_i), where y_i > 0.

The queen wants to take as many pawns as possible. White pawns do not move, and the queen can make as many consecutive turns as needed. However, each turn the queen must take a pawn. It is not allowed to jump over a pawn.

Find out what is the maximal number of pawns the queen can take, and which pawns it must take to achieve this number.

Input

The first line of the input file contains — the number of pawns (1 \leq n \leq 50000). The following lines contain two integer numbers each — the coordinates (x_i, y_i) of the pawns (|x_i| \leq 10^9, 0 < y_i \leq 10^9). No two pawns occupy the same position.

Output

The first line of the output file must contain one integer number — the number of pawns the queen can take. The second line must contain integer numbers — the numbers of the pawns the queen can take in the order she must do it. The pawns are numbered starting from in the order they are given in the input file.

Examples

Example 1

Loading
Loading