Divide into 2 groups
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Divide the numbers into two groups so that the absolute difference between the sums of the elements in these groups is the smallest possible.
Input
One integer .
Output
In the first line, print two integers — the number of elements in the first and second groups.
In the second line, print the elements of the first group, and in the third line — the elements of the second group.
The elements within each group can be printed in any order. Each number from to must be included in exactly one of the groups.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 39%