Each pair is on a separate line. Pairs can appear in any order, regardless of their type. The log is updated after each pair of type (a) and each pair of type (b) is processed according to the current network configuration.
For each test case, the output must follow the description below. The outputs of two consecutive cases will be separated by a blank line.
The program prints two integer numbers to the standard output on the same line, in the order: 'successful answers, unsuccessful answers', as shown in the sample output.
Note: For example, the first input illustrated in the sample below corresponds to a network of 10 computers and 7 pairs. There are '1' successfully answered questions and '2' unsuccessfully answered questions.