URI Online Judge | 1397

Game of The Greatest

By Lucas Hermann Negri, UDESC Brasil
Timelimit: 1

Og loves to play with his children. His favorite game is the game of the greatest, invented by himself. This hobby (there was a lot of available time to play in the cavemen's era) is played by two players, Og and one of his children. The rules of the game are as follows: First, the players choose the number of rounds of the match. During a round, each player yells a number between 0 and 10. The player who yells the greatest number scores one point (in case of a tie, no one scores). After all the rounds, the points are counted and the player who has the greater score wins.

Og and his children really like this game, but they usually get lost doing the math. Will you help Og to determine the final score?

Input

The input consists of several test cases (matches). Each test case starts with an integer N (1 ≤ N ≤ 10) that describes the number of rounds of the match. The value N = 0 indicates the end of the input, and should not be processed. The next N lines contain two integers A and B each (0 ≤ A, B ≤ 10). A is the number yelled by the first player during the round, and B is the number yelled by the second player during the round.

Output

The output must contain one line for each test case. This line contains the players' score, separated by a single space.

Sample Input Sample Output

3
5 3
8 2
5 6
2
5 5
0 0
0

2 1
0 0