H. Game Case
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

There are $$$N$$$ cards on the board, each with two integers written on it — one on the left and one on the right. One of the cards has the word "Prize" written on the back.

Two players are playing the game. The host whispers the left number on the prize card to the first player and the right number to the second player. The players are not allowed to explicitly tell each other their numbers, but they can give hints. If both players guess the prize card, they will share the prize between them. The less obvious the hints are, the more valuable the prize will be.

Once, during one of the games, the following dialogue took place between the players:

  • Player 1: I know that you don't know the prize card. And I don't know it either.
  • Player 2: Thank you, now I know the prize card.
  • Player 1: Thank you, now I know it too.

After this, one of the spectators in the audience exclaimed, "I know it too!" Can you determine the prize card?

Input

The first line of the input contains a positive integer $$$N$$$ — the number of cards ($$$N \le 100$$$). Each of the following $$$N$$$ lines contains a description of a card — two integers from 1 to 100 separated by a space, first the left one, then the right one. There are no repeated pairs. It is guaranteed that the host, players, and spectator tell the truth and do not make mistakes.

Output

Output two numbers on the prize card — first the left one, then a space, then the right one.

Example
Input
9
1 2
1 3
1 4
1 5
6 3
6 7
8 7
8 4
8 5
Output
6 3