A tie in a game occurs when you have an equal number of wins as losses.
Given a series of wins and losses, can you determine if there is a tie or not?
Input Specification
The first line will contain the integer , the number of events that occur. There will be between and events, inclusive.
The next lines will each contain an integer, , followed by either L
or W
. This means that you lost or won times, where L
is loss and W
is win. will be between and , inclusive.
Output Specification
Output two integers on one line: The number of losses followed by the number of wins.
Sample Input
4
3 L
2 W
4 W
0 L
Sample Output
3 6
Comments