Given $n$ points in a Cartesian coordinate system, find the distance between the two closest points and the distance between the two farthest points. Note that the distance is the Euclidean distance.
Input
The first line contains an integer $n$.
The next $n$ lines each contain two non-negative floating-point numbers, $x_i$ and $y_i$, representing the $X$ and $Y$ coordinates of the $i$-th point.
Output
A single line containing two floating-point numbers, representing the shortest distance and the longest distance. An error of no more than $0.01$ is considered correct.
Examples
Input 1
4
0.0 0.0
0.0 1.0
1.0 0.0
1.0 1.0
Output 1
1.00 1.41
Subtasks
- For $30\%$ of the data, $n \leq 2000$.
- For $70\%$ of the data, $n \leq 20000$.
- For $100\%$ of the data, $0 < n \leq 10^5$, and all input numbers are non-negative and do not exceed $10^9$.