Problem:
Closest Pair

For given n points in metric space, find the distance of the closest points.

Input

n
x0 y0
x1 y1
:
xn-1 yn-1

The first integer n is the number of points.

In the following n lines, the coordinate of the i-th point is given by two real numbers xi and yi. Each value is a real number with at most 6 digits after the decimal point.

Output

Print the distance in a line. The output values should be in a decimal fraction with an error less than 0.000001.

Constraints

2 ≤ n ≤ 100,000

-100 ≤ x, y ≤ 100

Sample Input 1

2
0.0 0.0
1.0 0.0

Sample Output 1

1.000000

Sample Input 2

3
0.0 0.0
2.0 0.0
1.0 1.0

Sample Output 2

1.41421356237

Solution in Python3 (judge verdict: Wrong Answer)

num_point = int(input())
point_list = [0] * num_point
for i in range(num_point):
    line_split = input().split(" ")
    point_list[i] = [float(line_split[0]), float(line_split[1])]

min_sum_square = float("inf")
for i in range(num_point):
    for j in range(i + 1, num_point):
        x_dif = point_list[i][0] - point_list[j][0]
        y_dif = point_list[i][1] - point_list[j][1]
        if x_dif < min_sum_square and y_dif < min_sum_square:
            sum_square = x_dif**2 + y_dif**2
            if sum_square < min_sum_square:
                min_sum_square = sum_square
        else:
            continue

min_distance = min_sum_square**0.5
print(min_distance)