E. Long Live Mexico
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

On September 15, 1810, Mexico begins its battle for independence. The date is celebrated with grand festivities, music, and fireworks. However, due to the pollution generated by the fireworks' explosions, Mexican citizens have been seeking an alternative to traditional fireworks.

With the popularization of drones, it is now common to use these devices to perform at events, creating complex figures in beautiful light shows. The drones are not real-time controlled. A program is loaded into one of the drones, called the primary drone, while the other drones, the servant drones, receive instructions from this single drone. The organizers of the festivities are concerned about whether the primary drone's battery will be sufficient to complete the entire show.

In this problem, we will represent each drone as a point in three-dimensional space $$$(x, y, z) \in \mathbb{Z}^3$$$. Consider that drone number 0 is the primary drone. Each servant drone is distinct, so each one has a cost $$$w_i$$$ to transmit the signal. The total transmission cost between the primary drone and a servant drone grows quadratically with the Euclidean distance between them, given by:

$$$$$$\operatorname{dist}(i, j) = \sqrt{(x_i - x_j)^2 + (y_i - y_j)^2 + (z_i - z_j)^2}$$$$$$

To maximize the uptime of the primary drone, we want to minimize the total transmission cost, which is given by:

$$$$$$\sum_{j = 1}^{j \leq n}\operatorname{dist}(0, j)^2w_j.$$$$$$

The Latin American ICPC Final will be held in Mexico, and the organizers of the festivities have requested your help to solve this problem. Given the positions of the servant drones and the transmission costs of each one, determine the coordinates of the primary drone that minimizes the total transmission cost. The position of the primary drone must be integral. In case of multiple answers, print the lexicographically smallest one.

Input

The first line contains an integer $$$n$$$ $$$(1 \leq n \leq 10^5)$$$, the number of servant drones.

The next $$$n$$$ lines contain four integers separated by spaces $$$x_i, y_i, z_i$$$ and $$$w_i$$$, representing the coordinates of the $$$i$$$-th drone $$$1 \leq x_i, y_i, z_i \leq 2\cdot 10^5$$$ and the transmission cost $$$1 \leq w_i \leq 10^3$$$.

Output

Print in a single line three integers separated by spaces, representing the position of the primary drone that minimizes the transmission cost. In case of multiple answers, print the lexicographically smallest one.

Examples
Input
3
1 1 1 1
2 2 2 1
3 3 3 1
Output
2 2 2 
Input
4
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
Output
3 3 3