Alex missed a ballroom dance competition that he wanted to attend, so now he wants to reconstruct which pairs of dancers performed together. He has one photo of the competition in which every dancer is clearly visible, and from it he wrote down the coordinates of all N dancers (N is even).
Alex reconstructs the pairs with the following algorithm. Among the dancers that are not yet paired, he repeatedly chooses the two dancers that are closest to each other (by Euclidean distance) and assumes they form a pair. If several unpaired pairs share the same minimum distance, he chooses the lexicographically smallest pair. Dancers are numbered from 1 to N, and inside a pair the dancer with the smaller number is written first, so a pair (a,b) always has a<b; two pairs are compared first by a and then by b.
Help Alex determine all of the pairs.
The first line contains an even integer N (2≤N≤300).
Each of the next N lines contains two integers: the x and y coordinates of the i-th dancer. Every coordinate has absolute value less than 108.
Output N/2 lines, one per pair. Each line contains the two numbers of the dancers in that pair, the smaller number first. The lines must be sorted in lexicographically ascending order.