Slavko has started to follow the NBA league. The game duration is exactly
Input Specification
The first line of input contains one integer
Each description consists of a team that scored, which is either
Output Specification
The first line of output must contain the duration that the first team was in the lead.
The second line of output must contain the duration that the second team was in the lead.
All durations should be in
Sample Input 1
1
1 20:00
Sample Output 1
28:00
00:00
Sample Input 2
3
1 01:10
2 21:10
2 31:30
Sample Output 2
20:00
16:30
Sample Input 3
5
1 01:10
1 02:20
2 45:30
2 46:40
2 47:50
Sample Output 3
45:30
00:10
Comments