100 atcoder#ABC154A. [ABC154A] Remaining Balls
[ABC154A] Remaining Balls
Score : points
Problem Statement
We have balls with the string written on each of them and balls with the string written on each of them. From these balls, Takahashi chooses one with the string written on it and throws it away. Find the number of balls with the string and balls with the string that we have now.
Constraints
- , , and are strings consisting of lowercase English letters.
- The lengths of and are each between and (inclusive).
- or .
- and are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer, with space in between.
red blue
3 4
red
2 4
Takahashi chose a ball with red
written on it and threw it away.
Now we have two balls with the string and four balls with the string .
red blue
5 5
blue
5 4
Takahashi chose a ball with blue
written on it and threw it away.
Now we have five balls with the string and four balls with the string .