During the long joyful time with Hefeng, though, Yunyan sometimes felt weird and had nightmares, in which his power vanished and he would then disappeared. He got afraid and decided to prepare some contingencies. He found an Abyss Chronosphere which can go back to the previous time. Feeling restless, he decided to carry it all the time in case of accidents. However, it's too big to carry. To compress it, he needed to do as follow:
Given integer points in two dimensional Euclidean plane indexed from to (inclusive). You should divide these points into groups, satisfying every point belongs to only one group and every group has at least one point. Define the distance of two groups is the shortest distance of two points where one point belongs to the first group and the other point belongs to the second group. In other word, given two groups , , the distance of is . Let .You should find a division scheme, so that is maximized among all possible division schemes.
输入
Input the first line with two integers .
Then input lines, the i-th line with two integers .
It's guaranteed that , it's impossible that .
输出
Output the first line with one integer .
Then output lines, for each line: the first integer in the i-th line is the number of points in the i-th group. Then output integers denoting the indexes of all points in the i-th group. You can output them in any order.
If multiple schemes available, output any.
样例
标准输入 复制文本 |
4 2 0 0 0 1 1 1 1 0 |
标准输出 复制文本 |
1 2 1 2 2 3 4 |
标准输入 复制文本 |
9 3 2 2 2 3 3 2 3 3 3 5 3 6 4 6 6 2 6 3 |
标准输出 复制文本 |
4 4 1 2 3 4 3 5 6 7 2 8 9 |
来源
2022 软件学院 ACM 集训队筛选赛 (热身赛)