CSES - Same Sum Subsets
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Given a set of nn positive integers, your task is to choose two disjoint subsets of the elements that have the same sum.

Input

The first line has an integer nn: the set size.

The second line has nn integers x1,x2,,xnx_1,x_2,\dots,x_n: the set elements.

Output

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.

Constraints

  • 3n403 \le n \le 40
  • i=1nxi2n2\sum_{i=1}^{n} x_i \le 2^{n}-2

Example

Input:

6
1 2 3 5 7 8

Output:

2
2 3
1
5

Explanation: The first subset is {2,3}\{2,3\} and the second subset is {5}\{5\}.