Description
Consider $n$ integer points on a plane, where $n$ is divisible by $3$. The $x$ coordinates are a permutation of integers from $1$ to $n$. The $y$ coordinates are also a permutation of integers from $1$ to $n$.
Construct a configuration of $n/3$ triangles with vertices in the given points: each point must appear as a vertex of one of the triangles. The triangles can be degenerate and can intersect freely.
The score of a configuration is the sum of the sizes of all triangles in it. The size of a triangle is the perimeter of its bounding rectangle. The bounding rectangle is the minimal rectangle with sides parallel to coordinate axes that contains the triangle.
Find a configuration that achieves the maximum possible score.
Input
The first line contains an integer $n$ ($3 \le n \le 99\,999$; $n$ is divisible by $3$).
Each of the next $n$ lines contains two integers $x$ and $y$: the coordinates of one of the points. Each integer from $1$ to $n$ appears once among the $x$ coordinates and once among the $y$ coordinates.
Output
On the first line, print the maximum possible score.
Next, print any configuration that achieves this score. For that, print $n/3$ lines with three integers in each: the numbers of points in the input that are the vertices of a triangle. The points are numbered from $1$ to $n$ in the input order. Triangles and their vertices can be printed in any order.
Example
6
6 5
3 6
5 3
2 4
1 1
4 2
32
2 3 5
6 1 4
Note
