Spongebob and Patrick are having a competition.
In their competition, they are supposed to solve simple math sums involving the subtraction and addition of 2 numbers.
They decided to give each other a list of n such questions to complete.
Now, they have completed the questions and in order to ensure fairness, they want you to mark it.
However, n can go up to 5000 resulting in that being a very tedious chore.
You therefore decided to create a program to mark it for them!
Input
The first line of input is a single integer, n
The following 2n lines is as follows:
<Integer> <Operator> <Integer> = <Integer>
The first n lines belong to Spongebob while the remaining n lines belong to Patrick.
Output
The program should output the number of correct equations Spongebob and Patrick have, respectively.
Grading
For 30% of the test cases, there will only be addition.
For 30% of the test cases, there will only be subtraction.
For 80% of the test cases, 1 <=
n <= 100
For 100% of the test cases, 1 <=
n <= 5000 and all numbers below 5000.
For 50% of the test cases, the numbers will all be positive.
Sample Input 1:
3
5 + 6 = 11
3 - 9 = 4
5 + -3 = 2
9 - 6 = 3
4 + 8 = 12
1 - 2 = -1
Sample Output 1:
Spongebob: 2
Patrick: 3