Given a set of $n$ positive integers, your task is to choose two disjoint subsets of the elements that have the same sum.
The first line has an integer $n$ : the set size.
The second line has $n$ integers $x_1,x_2,\dots,x_n$ : the set elements.
For both subsets, first print the size of the subset and then its contents. You can print any valid solution. If there is no solution, print IMPOSSIBLE
.
6 1 2 3 5 7 8
\n · · · · · \n
2 2 3 1 5
\n · \n \n \n
The first subset is ${2,3}$ and the second subset is ${5}$ .