Advent in Zagreb is a traditional holiday manifestation whose main attraction is a magical Christmas market located at the city centre. It should also be noted that this event was voted the best in Europe for three years in a row. Apart from travelling fast, good news also has the tendency to travel far. Indeed, the information about Advent in Zagreb reached North Pole and Santa Claus himself. Interestingly enough, Santa never visited Croatia (except for usual business on Christmas Eve). When you think about it, that makes sense since he doesn't really like summer activities by the sea and he can solve COCI problems from the comfort of his own home.
Luckily, he decided to visit our Christmas market so he sent a letter to the town hall stating that he will land on Zagreb's main square in the early morning of December
You are probably wondering: "How exactly does Santa plan to land, there is no runway there!". You are right, there is not, but we'll manage. The town hall already prepared
Input
The first line contains an integer
The next line contains
Output
In the first line you should output an integer
In the second line you should output
In the third line you should output an integer
In the fourth line you should output
The rows are not allowed to be empty (-1
in the only line of output.
Scoring
Subtask | Score | Constraints |
---|---|---|
No additional constraints. |
Sample Input 1
4
1 3 2 4
Sample Output 1
2
1 2
2
3 4
Sample Input 2
6
23 4 7 6 8 15
Sample Output 2
3
4 6 8
3
7 15 23
Sample Input 3
6
1 2 3 7 9 10
Sample Output 3
-1
Comments