#C5106. Find the Treasure Point

    ID: 48719 Type: Default 1000ms 256MiB

Find the Treasure Point

Find the Treasure Point

You are given an integer n and two lists of n coordinates each: one list representing the positions of temples and the other representing keys. Each temple is represented by its Cartesian coordinates \(T = (x, y)\) and each key by \(K = (k, l)\).

It is known that there is a magical connection between the temples and the keys such that for the correct pairing, the treasure point \(P\) is given by:

[ P = T + K ]

In this problem, due to a peculiar enchantment, you can determine the treasure point \(P\) simply by adding the coordinates of the first temple and the first key. In other words, if the first temple is \((x_1, y_1)\) and the first key is \((k_1, l_1)\), then the treasure point is:

[ P = (x_1 + k_1,; y_1 + l_1)]

Your task is to read the input, compute \(P\) as described above, and output its coordinates.

inputFormat

The input is given in the following format:

n
x1 y1
...
xn yn
k1 l1
...
kn ln

Here, the first line contains an integer \(n\) which means the number of temples (and keys). The following \(n\) lines each contain two integers representing the coordinates of a temple. The next \(n\) lines each contain two integers representing the coordinates of a key.

outputFormat

Output a single line containing two integers \(P_x\) and \(P_y\) — the coordinates of the treasure point \(P\), separated by a space.

## sample
3
1 1
2 3
-1 -2
4 0
1 1
-3 2
5 1