Distribute the Bars

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

There are NN metal bars. The weight of ii-th metal bar is 2i12i - 1.

Your task is to distribute those metal bars into two or more groups such that the sum of weights of metal bars in each group will be the same, or determine that it is impossible. Note that each metal bar must go to exactly one group, and that it is not allowed to cut the metal bars.

입력

The input contains one integer NN (2N1052 \le N \le 10^5).

출력

If there is no way to distribute the metal bars into two or more equally weighted groups, print one line containing the integer 1-1.

Otherwise, on the first line, print the number of groups GG (2GN2 \le G \le N). Then print GG lines, one for each group. The ii-th of these lines must start with the the integer K_iK\_i, the number of metal bars in the ii-th group. Then print K_iK\_i integers: the weights of the metal bars in the group. Each metal bar must be assigned to exactly one group, and the sums of weights of the metal bars in all groups must be the same.

If there is more than one solution, print any one of them.