Problem7483--[CSES Problem Set] Two Sets

7483: [CSES Problem Set] Two Sets

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB  Special Judge

Description

Your task is to divide the numbers $1,2,…,n$ into two sets of equal sum.

Input

The only input line contains an integer $n$.

Output

Print "YES", if the division is possible, and "NO" otherwise.
After this, if the division is possible, print an example of how to create the sets. First, print the number of elements in the first set followed by the elements themselves in a separate line, and then, print the second set in a similar way.

Constraints

$1≤n≤10^6$

Sample 1 Input

7

Sample 1 Output

YES
4
1 2 4 7
3
3 5 6

Sample 2 Input

6

Sample 2 Output

NO

HINT

相同题目:CSES 1092.

Source/Category