시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB17214411983.217%

문제

King Carl's kingdom contains $k$ keeps (commonly called castles).

Coordinates of keeps are known, and King Carl considers himself convinced that it could be convenient to choose a central keep as King Carl's residence.

Critically, King Carl considers that the average cost to carry commands from King Carl's residence to King Carl's other keeps should be small.

Compute the minimal average Euclidean distance1 from his residence keep to the other keeps if King Carl chooses his residence optimally.


1The Euclidean distance between two points is the length of a straight line segment between these points.

입력

The input consists of:

  • One line with an integer $k$ ($2\leq k\leq 1000$), the number of keeps.
  • $k$ lines, each with two integers $x$ and $y$ ($|x|, |y| \leq 1000$), the coordinates of the keeps.

It is guaranteed that all keeps are at distinct locations.

출력

Output the minimal possible average distance from the keep that is chosen as the king's residence to all other keeps.

Your answer should have an absolute or relative error of at most $10^{-6}$.

예제 입력 1

3
0 0
9 9
0 9

예제 출력 1

9

예제 입력 2

5
-3 5
6 8
1 2
5 -4
-7 -9

예제 출력 2

8.405705684