#K45547. Central Server Optimal Location
Central Server Optimal Location
Central Server Optimal Location
Given n laboratories with their coordinates, find the optimal location for the central server. The optimal location is defined as the arithmetic mean of the coordinates. In other words, if the laboratories are located at \( (x_1, y_1), (x_2, y_2), \dots, (x_n, y_n) \), then the optimal location \( (x^*, y^*) \) is given by:
\( x^* = \frac{\sum_{i=1}^{n} x_i}{n} \) and \( y^* = \frac{\sum_{i=1}^{n} y_i}{n} \).
The answers should be printed with six decimal places of precision.
inputFormat
The first line contains an integer n — the number of laboratories. Each of the following n lines contains two space-separated integers representing the x and y coordinates of each laboratory.
outputFormat
Print the optimal x and y coordinates separated by a space, each formatted to six decimal places.
## sample3
0 0
2 0
1 1
1.000000 0.333333
</p>