#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll; typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename A,size_t N,typename T>void Fill(A(&array)[N],const T &val){fill((T*)array, (T*)(array+N), val);}
const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2;
//template end

int rnd=1341398;
void xshift(){
    rnd=rnd^(rnd<<13); rnd=rnd^(rnd>>17); rnd=rnd^(rnd<<5);
}
int n,x[110],y[110],xs,ys,xmax,ymax; ll maxx,diff,best=0;
bool ans[110],sub[110];
ll calc(bool f){
    xs=0,ys=0;
    rep(i,0,n)if(f?sub[i]:ans[i]){
        xs+=x[i],ys+=y[i];
    }
    return 1LL*xs*xs+1LL*ys*ys;
}

int main(){
    scanf("%d",&n);
    rep(i,0,n){
        scanf("%d%d",&x[i],&y[i]);
        if(x[i]>=0&&y[i]>=0)ans[i]=1; 
        chmax(xmax,abs(x[i])); chmax(ymax,abs(y[i]));
    }
    maxx=1LL*xmax*xmax+1LL*ymax*ymax;
    clock_t s=clock(); double t,p;
    while(1){
        t=(double)(clock()-s)/CLOCKS_PER_SEC; if(t>0.49)break;
        rep(i,0,100){
            sub[i]=ans[i];
            xshift();
            if(abs(rnd)<=inf/10)sub[i]^=1;
        }
        diff=calc(1)-calc(0);
        if(diff>=0){
            rep(i,0,100)ans[i]=sub[i];
        }
        else{
            p=2LL*inf*exp(diff*1.0/(maxx-maxx*t/3.0));
            xshift();
            if(abs(rnd)<=p){
                rep(i,0,100)ans[i]=sub[i];
            }
        }
        chmax(best,calc(0));
    }
    rep(i,0,n)ans[i]=0;
    rep(i,0,n)if(x[i]>=0&&y[i]<=0)ans[i]=1;
    s=clock();
    while(1){
        t=(double)(clock()-s)/CLOCKS_PER_SEC; if(t>0.49)break;
        rep(i,0,100){
            sub[i]=ans[i];
            xshift();
            if(abs(rnd)<=inf/10)sub[i]^=1;
        }
        diff=calc(1)-calc(0);
        if(diff>=0){
            rep(i,0,100)ans[i]=sub[i];
        }
        else{
            p=2LL*inf*exp(diff*1.0/(maxx-maxx*t/3.0));
            xshift();
            if(abs(rnd)<=p){
                rep(i,0,100)ans[i]=sub[i];
            }
        }
        chmax(best,calc(0));
    }
    rep(i,0,n)ans[i]=0;
    rep(i,0,n)if(x[i]<=0&&y[i]<=0)ans[i]=1;
    s=clock();
    while(1){
        t=(double)(clock()-s)/CLOCKS_PER_SEC; if(t>0.49)break;
        rep(i,0,100){
            sub[i]=ans[i];
            xshift();
            if(abs(rnd)<=inf/10)sub[i]^=1;
        }
        diff=calc(1)-calc(0);
        if(diff>=0){
            rep(i,0,100)ans[i]=sub[i];
        }
        else{
            p=2LL*inf*exp(diff*1.0/(maxx-maxx*t/3.0));
            xshift();
            if(abs(rnd)<=p){
                rep(i,0,100)ans[i]=sub[i];
            }
        }
        chmax(best,calc(0));
    }
    rep(i,0,n)ans[i]=0;
    rep(i,0,n)if(x[i]<=0&&y[i]>=0)ans[i]=1;
    s=clock();
    while(1){
        t=(double)(clock()-s)/CLOCKS_PER_SEC; if(t>0.49)break;
        rep(i,0,100){
            sub[i]=ans[i];
            xshift();
            if(abs(rnd)<=inf/10)sub[i]^=1;
        }
        diff=calc(1)-calc(0);
        if(diff>=0){
            rep(i,0,100)ans[i]=sub[i];
        }
        else{
            p=2LL*inf*exp(diff*1.0/(maxx-maxx*t/3.0));
            xshift();
            if(abs(rnd)<=p){
                rep(i,0,100)ans[i]=sub[i];
            }
        }
        chmax(best,calc(0));
    }
    printf("%.12f\n",sqrt(best));
    return 0;
}

Measured memory_bytes: 384