Pairs#1234

Pairs

1 second
64 megabytes
Easy

At a chess tournament, there are players, where is even. Players need to be paired for the first round. The pairing algorithm is as follows: among players not yet paired, choose two whose seating distance is minimal, and assume they will play against each other. If there are multiple pairs of players with the same minimum distance, select the pair with the lexicographically smallest numbers (all players are numbered from to ; within a pair, the player with the smaller number comes first).

You are tasked to implement this algorithm.

Input

The first line contains the even number (2 \leq N \leq 300). Each of the next lines contains two integers x_i, y_i — the seating coordinates of each player; the -th line gives the coordinates of the player with number . For different players, at least one of the given coordinates is different. Coordinates do not exceed 10^8 in absolute value.

Output

Print lines — the numbers of pairs of players who will play against each other. Pairs must be printed in lexicographical order, and within each pair, the first number must be less than the second.

Examples

Example 1

Loading
Loading