Points:
1200
Time limit:
1.0s
Memory limit:
512M
Input:
stdin
Output:
stdout
Your task is to divide the numbers ~1, 2, \ldots, n~ into two sets of equal sum.
Input
- The only input line contains an integer ~n~.
Output
- Print
YES
, if the division is possible, andNO
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.
Giới hạn
- ~1 \le n \le 10^6~
Example
Sample input 1
7
Sample output 1
YES
4
1 2 4 7
3
3 5 6
Sample input 2
6
Sample output 2
NO
Comments (5)