Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point , which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at obelisks. These clues were in an ancient language, and he has only decrypted them at home. Since he does not know which clue belongs to which obelisk, finding the treasure might pose a challenge. Can you help him?
As everyone knows, the world is a two-dimensional plane. The -th obelisk is at integer coordinates . The -th clue consists of integers and belongs to the obelisk , where is some (unknown) permutation on elements. It means that the treasure is located at . This point is the same for all clues.
In other words, each clue belongs to exactly one of the obelisks, and each obelisk has exactly one clue that belongs to it. A clue represents the vector from the obelisk to the treasure. The clues must be distributed among the obelisks in such a way that they all point to the same position of the treasure.
Your task is to find the coordinates of the treasure. If there are multiple solutions, you may print any of them.
Note that you don't need to find the permutation. Permutations are used only in order to explain the problem.
Input Format: The first line contains an integer () — the number of obelisks, that is also equal to the number of clues.
Each of the next lines contains two integers , () — the coordinates of the -th obelisk. All coordinates are distinct, that is or will be satisfied for every such that .
Each of the next lines contains two integers , () — the direction of the -th clue. All coordinates are distinct, that is or will be satisfied for every such that .
It is guaranteed that there exists a permutation , such that for all it holds .
Output Format: Output a single line containing two integers — the coordinates of the treasure.
If there are multiple answers, you may print any of them.
Note: As , we can consider all permutations on two elements.
If , then the obelisk holds the clue , which means that the treasure is hidden at . The second obelisk would give the clue and the treasure at . However, both obelisks must give the same location, hence this is clearly not the correct permutation.
If the hidden permutation is , then the first clue belongs to the second obelisk and the second clue belongs to the first obelisk. Hence , so is the location of the treasure.
In the second sample, the hidden permutation is .