#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;
#define double long double
double px[10000], py[10000];
int N;
int argmax(double* arr) {
    double maxval;
    int maxindex = -1;
    for (int i=0; i<N; i++) {
        if (maxindex == -1 || maxval < arr[i]) {
            maxval = arr[i];
            maxindex = i;
        }
    }
    return maxindex;
}

double solve(double ax, double ay, double ux, double uy, double bx, double by, double vx, double vy) {
    // solve a + su = b + tv
    // su - tv = b - a
    // (s, t) = (u, -v).inv @ (b-a)
    double mat[2][2] = {
        { ux, -vx },
        { uy, -vy }
    };
    double det = mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0];
    //cout << "det:" << det << endl;
    double idet = 1 / det;
    double inv[2][2] = {
        { idet * mat[1][1], -idet * mat[0][1] },
        { -idet * mat[1][0], idet*mat[0][0] }};
    double s = inv[0][0] * (bx-ax) + inv[0][1] * (by-ay);
    double t = inv[1][0] * (bx-ax) + inv[1][1] * (by-ay);
    //cout << "st" << s << " " << t << endl;
    double xx = ax + s * ux;
    double yy = ay + s * uy;
    //cerr << xx << " " << yy << endl;
    //cerr << bx+t*vx << " " << by+t*vy << endl;
    return sqrt((xx-ax) * (xx-ax) + (yy-ay)*(yy-ay));

}

double calc(double base_rad) {
    double farA[10000], farB[10000], farC[10000];

    double cosA = cos(base_rad + M_PI*2/3);
    double sinA = sin(base_rad + M_PI*2/3);
    double cosB = cos(base_rad - M_PI*2/3);
    double sinB = sin(base_rad - M_PI*2/3);
    double cosC = cos(base_rad);
    double sinC = sin(base_rad);
    // transform
    for (int i=0; i<N; i++) {
        farA[i] = px[i] * cosA + py[i] * sinA;
        farB[i] = px[i] * cosB + py[i] * sinB;
        farC[i] = px[i] * cosC + py[i] * sinC;
        //cout << farA[i] << endl;
        //cout << farB[i] << endl;
        //cout << farC[i] << endl;
        //cout << endl;
    }
    int maxAindex = argmax(farA);
    int maxBindex = argmax(farB);
    int maxCindex = argmax(farC);
    double pax = px[maxAindex];
    double pay = py[maxAindex];
    double pbx = px[maxBindex];
    double pby = py[maxBindex];
    double pcx = px[maxCindex];
    double pcy = py[maxCindex];
    double vecAx = -sinA;
    double vecAy = cosA;
    double vecBx = -sinB;
    double vecBy = cosB;
    double vecCx = -sinC;
    double vecCy = cosC;
    //cout << "vecC " << vecCx << "," << vecCy << endl;
    double val = solve(pcx, pcy, vecCx, vecCy, pbx, pby, vecBx, vecBy) + solve(pcx, pcy, vecCx, vecCy, pax, pay, vecAx, vecAy);
    return val;
}

int main() {
    cin >> N;
    for (int i=0; i<N; i++) cin >> px[i] >> py[i];

    const int try_n = 10000;
    const int try2_n = 10000;
    double minval = -1;
    double minrad = 0;

    for (int try_i = 0; try_i < try_n; try_i++) {
        double base_rad = try_i * M_PI * 2 / 3 / try_n;
        double val = calc(base_rad);
        if (minval == -1 || val < minval) {
            minval = val;
            minrad = base_rad;
        }
    }
    double rad_from = minrad - M_PI * 2 / 3 / try_n;
    double rad_to = minrad + M_PI * 2 / 3 / try_n;
    for (int try_i = 0; try_i < try2_n; try_i++) {
        double base_rad = rad_from + (rad_to - rad_from) * try_i / try2_n;
        double val = calc(base_rad);
        if (minval == -1 || val < minval) {
            minval = val;
            minrad = base_rad;
        }
    }
    cout << setprecision(15) << minval << endl;
        
    return 0;
}




Measured memory_bytes: 4340