- Every evening, hundreds of students gather up at canteen and buy various snacks. Many of these students prefer to pay through E-Wallets and UPI methods such as PayTM, PhonePe and Google Pay etc.
Due to the rush, the owner can't keep track of all payments and verify if a student has actually made the payment or not. But the canteen owner has visual memory i.e. he can remember a few digits of phone numbers after looking at it just once. The digits that he can't remember, he marks them with the symbol '%'.
Ex. For a phone number 1234567890, he may remember it as 1234%67%9%.
Now, it is your job to find out whether a given set of students have made the payment or not.
|First line will contain N, number of students. Then the N phone numbers will follow.
Each of the next N lines consists of two ten digit numbers: the number that the canteen owner remembers and the corresponding actual number.
|Print two space-separated integers - the number of students who made the payment and the number of students who did not.|
- 1 ≤ T ≤ 100
- Maximum number of digits per phone number in each test case = 10