Woburn Challenge 2017-18 Round 1 - Junior Division

This is it - the exciting finals of the Stanley Cup playoffs are about
to begin! The format is a best-of-
In each game, the team which scores more points than the other team wins
(there are no ties). The series ends as soon as one team has won
By collecting data on all hockey games which have ever been played, and
performing some sophisticated data analysis, you've managed to predict
all of the upcoming games' scores with absolute certainty. You know
that, in the
All that's left is to place your bets on the winning team. You can rake in even more cash if you bet on the exact final game counts. As such, given your predicted scores, determine the number of games won by each of the teams when the series ends.
Input Specification
The input consists of seven lines, the
Output Specification
Output two space-separated integers, the number of games won by Teams
Sample Input
5 3
4 1
1 5
1 4
0 6
0 2
3 1
Sample Output
2 4
Sample Explanation
After the
Comments