
Christmas time is approaching, the most beautiful time of the year. Our protagonists, Marin and Josip, have returned from Christmas shopping and have started decorating their Christmas tree.
They bought

The illustration shows the initial state of the box in the second example. On his first move, Marin can
draw either an ornament of color
Josip came up with a game that would make decorating the tree even more fun, although it's already a lot of fun by itself. The game works as follows: Marin and Josip take turns, and Marin starts the game. The player in turn draws an ornament from the box (either from the left or the right end of the box) and places it on the tree. If they draw an ornament whose color has not been drawn yet, the player scores a point. The game ends when the last ornament is drawn from the box.
The winner of the game is the player who has scored more points, so both Marin and Josip want to maximize their number of points. Since both of them are excellent players, they will play optimally. Your task is to print the result at the end of the game.
Input Specification
The first line contains an integer
The second line contains
Output Specification
In the first and only line, print the result of the game: two numbers separated by the character :
, Marin's and Josip's scores.
Constraints
Subtask | Points | Constraints |
---|---|---|
1 | 17 | |
2 | 10 | |
3 | 26 | |
4 | 15 | |
5 | 42 | No additional constraints. |
Sample Input 1
5
1 1 2 1 1
Sample Output 1
1:1
Explanation for Sample 1

Marin is first, and he draws an ornament of color
Josip draws an ornament of color
Marin draws an ornament of color
Josip draws an ornament of color
Marin draws the last ornament (color
Marin has a total of
The final result is
Sample Input 2
6
1 2 3 1 2 3
Sample Output 2
2:1
Comments
this is same as COCI '06 Contest 5 #5 Ivana