#include <bits/stdc++.h>

template <typename T>
T sqr(T x) {
  return x * x;
}

int main() {
    freopen("icebergs.in", "r", stdin);
    freopen("icebergs.out", "w", stdout);
    int n;
    scanf("%d", &n);
    std::vector <int> x(n), y(n);
    for (int i = 0; i < n; i++)
        scanf("%d%d", &x[i], &y[i]);
    std::vector <double> dp(n, 1e18);
    dp[0] = 0;
    std::vector <int> stack(n);
    int h = 0;
    stack[h++] = 0;
    for (int i = 1; i < n; i++) {
        while (h && y[i] >= y[stack[h - 1]]) {
            int id = stack[h - 1];
            dp[i] = std::min(dp[i], std::max(dp[id], sqrt(sqr((x[id] - x[i]) * 1LL) + sqr((y[id] - y[i]) * 1LL))));
            if (y[i] >= y[id])
                --h;
        }
        if (h) {
            int id = stack[h - 1];
            dp[i] = std::min(dp[i], std::max(dp[id], sqrt(sqr((x[id] - x[i]) * 1LL) + sqr((y[id] - y[i]) * 1LL))));
        }
        stack[h++] = i;
    }
    printf("%.20lf\n", dp[n - 1]);
    return 0;
}
