#include <bits/stdc++.h>
using namespace std;
int x[101], y[101];
bool c1(int i, int j){
    return (x[i] > x[j] || (x[i] == x[j] && y[i] > y[j]));
}
bool c2(int i, int j){
    return (y[i] > y[j] || (y[i] == y[j] && x[i] > x[j]));
}
bool c3(int i, int j){
    return (y[i] > y[j] || (y[i] == y[j] && x[i] > x[j]));
}
bool c4(int i, int j){
    return (x[i] > x[j] || (x[i] == x[j] && y[i] > y[j]));
}
bool c5(int i, int j){
    return y[i]*1ll*x[j] < y[j]*1ll*x[i];
}
bool c6(int i, int j){
    return x[i]*1ll*y[j] < x[j]*1ll*y[i];
}
int main(){
    int n;
    scanf("%d", &n);
    for(int i=1;i<=n;i++){
        scanf("%d%d", &x[i], &y[i]);
    }

    long double ans = 0;
    long double X = 0, Y = 0;
    for(int i=1;i<=n;i++){
        X += x[i];
        Y += y[i];
    }
    for(int j=0;j<4;j++){
        for(int i=1;i<=n;i++){
            if(j == 1 || j == 3) x[i] = -x[i];
            if(j == 2 || j == 3) y[i] = -y[i];
        }

        vector<int> xx, yy;
        long double X = 0, Y = 0;
        for(int i=1;i<=n;i++){
            if(x[i] >= 0 && y[i] >= 0){
                X += x[i];
                Y += y[i];
            }
            else if(x[i] < 0 && y[i] >= 0){
                xx.push_back(i);
            }
            else if(x[i] >= 0 && y[i] < 0){
                yy.push_back(i);
            }
        }
        sort(xx.begin(), xx.end(), c1);
        sort(yy.begin(), yy.end(), c2);

        long double TX = X, TY = Y;
        for(int i=0;i<xx.size();i++){
            int j = xx[i];

            long double BX = X, BY = Y;
            for(int i=0;i<yy.size();i++){
                int j = yy[i];

                long double TX = BX, TY = BY;
                TX += x[j];
                TY += y[j];
                long double res = (BX*BX + BY*BY);
                long double res2 = (TX*TX + TY*TY);
                
                if(res < res2){
                    BX = TX;
                    BY = TY;
                }
                ans = max(ans, BX*BX + BY*BY);
            }

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
            
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }
        for(int i=0;i<yy.size();i++){
            int j = yy[i];

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
            
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }

        X = TX, Y = TY;
        for(int i=0;i<yy.size();i++){
            int j = yy[i];

            long double BX = X, BY = Y;
            for(int i=0;i<xx.size();i++){
                int j = xx[i];

                long double TX = BX, TY = BY;
                TX += x[j];
                TY += y[j];
                long double res = (BX*BX + BY*BY);
                long double res2 = (TX*TX + TY*TY);
                
                if(res < res2){
                    BX = TX;
                    BY = TY;
                }
                ans = max(ans, BX*BX + BY*BY);
            }

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);

            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }
        for(int i=0;i<xx.size();i++){
            int j = xx[i];

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
          
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }

        sort(xx.begin(), xx.end(), c3);
        sort(yy.begin(), yy.end(), c4);

        X = TX, Y = TY;
        for(int i=0;i<xx.size();i++){
            int j = xx[i];

            long double BX = X, BY = Y;
            for(int i=0;i<yy.size();i++){
                int j = yy[i];

                long double TX = BX, TY = BY;
                TX += x[j];
                TY += y[j];
                long double res = (BX*BX + BY*BY);
                long double res2 = (TX*TX + TY*TY);
                
                if(res < res2){
                    BX = TX;
                    BY = TY;
                }
                ans = max(ans, BX*BX + BY*BY);
            }

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
            
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }
        for(int i=0;i<yy.size();i++){
            int j = yy[i];

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
            
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }

        X = TX, Y = TY;
        for(int i=0;i<yy.size();i++){
            int j = yy[i];

            long double BX = X, BY = Y;
            for(int i=0;i<xx.size();i++){
                int j = xx[i];

                long double TX = BX, TY = BY;
                TX += x[j];
                TY += y[j];
                long double res = (BX*BX + BY*BY);
                long double res2 = (TX*TX + TY*TY);
                
                if(res < res2){
                    BX = TX;
                    BY = TY;
                }
                ans = max(ans, BX*BX + BY*BY);
            }

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);

            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }
        for(int i=0;i<xx.size();i++){
            int j = xx[i];

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
          
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }

        sort(xx.begin(), xx.end(), c5);
        sort(yy.begin(), yy.end(), c6);

        X = TX, Y = TY;
        for(int i=0;i<xx.size();i++){
            int j = xx[i];

            long double BX = X, BY = Y;
            for(int i=0;i<yy.size();i++){
                int j = yy[i];

                long double TX = BX, TY = BY;
                TX += x[j];
                TY += y[j];
                long double res = (BX*BX + BY*BY);
                long double res2 = (TX*TX + TY*TY);
                
                if(res < res2){
                    BX = TX;
                    BY = TY;
                }
                ans = max(ans, BX*BX + BY*BY);
            }

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
            
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }
        for(int i=0;i<yy.size();i++){
            int j = yy[i];

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
            
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }

        X = TX, Y = TY;
        for(int i=0;i<yy.size();i++){
            int j = yy[i];

            long double BX = X, BY = Y;
            for(int i=0;i<xx.size();i++){
                int j = xx[i];

                long double TX = BX, TY = BY;
                TX += x[j];
                TY += y[j];
                long double res = (BX*BX + BY*BY);
                long double res2 = (TX*TX + TY*TY);
                
                if(res < res2){
                    BX = TX;
                    BY = TY;
                }
                ans = max(ans, BX*BX + BY*BY);
            }

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);

            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }
        for(int i=0;i<xx.size();i++){
            int j = xx[i];

            long double TX = X, TY = Y;
            TX += x[j];
            TY += y[j];
            long double res = (X*X + Y*Y);
            long double res2 = (TX*TX + TY*TY);
          
            if(res < res2){
                X = TX;
                Y = TY;
            }
            ans = max(ans, X*X + Y*Y);
        }

        for(int i=1;i<=n;i++){
            if(j == 1 || j == 3) x[i] = -x[i];
            if(j == 2 || j == 3) y[i] = -y[i];
        }

    }

    printf("%.20Lf\n", sqrt(ans));
}

Measured memory_bytes: 256