Penalty
After regular and extra time, the football match ended in a draw, leading to a penalty shootout. In this shootout, each team takes N penalty kicks. The kicks are taken alternately: the first kick is by a player from the first team, the second by a player from the second team, the third by the first team again, and so on. The team that scores more goals wins. However, if at any point it becomes clear which team will win (a team wins regardless of the outcome of the remaining kicks), the series stops and that team is declared the winner. If all 2N kicks are taken without determining a winner, the match is considered a draw. Your task is to determine the kick number after which the series ends and the penalty score.
Input
The input consists of an integer N (1 ≤ N ≤ 1000) followed by 2N numbers, each representing the result of the corresponding kick: 1 indicates a goal, and 0 indicates a miss or a save by the goalkeeper. The kicks are listed in the order they are taken. Odd-numbered kicks are taken by the first team, and even-numbered kicks by the second team.
Output
The output should be three numbers: the kick number after which the series ends, followed by the number of goals scored by the first and second teams, respectively.
Explanation of examples
In the first example, the series ended on the 9th kick because, regardless of whether the player from the second team scores on the 10th kick, the first team has already secured the win. The first team scored 5 goals, while the second team scored 3.