Interesting Set
题号:NC237542
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
Special Judge, 64bit IO Format: %lld

题目描述

A set consisting of positive integers is called , if after arbitrarily deleting one of its elements, the remaining set can be divided into two subsets with equal sum.

Given a positive integer n, please construct an interesting set with exactly n elements, or report that it is impossible. To simplify the checking progress, you need to point out the approach of dividing the set when each of the elements is deleted, if there exists a solution.

输入描述:

The first and only line of input contains a single integer , the requiring size of the set.

输出描述:

If there is no solution, print a single .

Otherwise, print a single in the first line. The second line should contains n space-separated integers , denoting the elements of the set. The integers must be pairwise distinct. It can be shown that if a solution exists, there must be a solution with all .

After that, for each i from 1 to n, print a line to give out your division of subsets when the i-th element is deleted. The line should begin with a number denoting the size of one of the subset, followed by k_i pairwise distinct integers denoting the indices of elements of the subset. must be held. The checker will automatically computes the other subset and check whether they have equal sums.
示例1

输入

复制
6

输出

复制
NO
示例2

输入

复制
7

输出

复制
YES
1 3 5 7 9 11 13 
4 2 3 4 5 
3 1 5 7 
4 1 2 4 6 
3 2 3 7 
2 4 7 
3 2 4 5 
4 1 2 3 5

说明

For the first example, it can be proved that there is no solution with n=6.

For the second example, \{1,3,5,7,9,11,13\} is an interesting set. For example, if you delete 1 from the set, you can divide the remaining set into \{3,5,7,9\} and \{11,13\} with 3+5+7+9=24=11+13, and when deleting 13 from the set, we have 1+3+5+9=20=7+13.

Note that you can print a_1,...,a_n in arbitrary order, not necessarily sorted. The sample output above sorts them for better reading experience. The same goes for A_{i,1},...,A_{i,k_i}.