#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PI arccos(-1)
#define rep(i, N) for (int i = 0; i < (N); i++)
#define REP(i, a, N) for (int i = a; i < (N); i++)
#define rrep(i, N, k) for (int i = (N); i >= (k); i--);
#define all(x) (x).begin(), (x).end()
#define vi vector<int>
#define pi pair<int, int>
#define pl pair<ll, ll>
template<class T> istream &operator>>(istream&is,vector<T>&v){for(auto &elemnt:v)is>>elemnt;return is;}
template<class T,class U> istream &operator>>(istream&is,pair<T,U>&p){is>>p.first>>p.second;return is;}
const int MOD = 1e9+ 7;
const int INF = numeric_limits<int>::max() - (int)1e8;
const ll INFLL = numeric_limits<ll>::max() - (ll)1e17;

struct Vertex {
    double x, y;
    
    Vertex() : x(0), y(0) {}
    Vertex(double x, double y) : x(x), y(y) {}

    Vertex &operator+=(const Vertex &input_vertex) {
        x += input_vertex.x;
        y += input_vertex.y;
        return *this;
    }

    Vertex &operator-=(const Vertex &input_vertex) {
        x -= input_vertex.x;
        y -= input_vertex.y;
        return *this;
    }

    Vertex &operator*=(double times) {
        x *= times;
        y *= times;
        return *this;
    }

    Vertex &operator/=(double divide) {
        x /= divide;
        y /= divide;
        return *this;
    }

    Vertex operator+(const Vertex &input_vertex) const { return Vertex(*this) += input_vertex;}

    Vertex operator-(const Vertex &input_vertex) const { return Vertex(*this) -= input_vertex;}

    Vertex operator*(double times) const { return Vertex(*this) *= times;}

    Vertex operator/(double divide) const { return Vertex(*this) /= divide;}

    friend istream &operator>>(istream &stream, Vertex &input_vertex) {
        return stream >> input_vertex.x >> input_vertex.y;
    }

    friend ostream &operator<<(ostream &stream, const Vertex &input_vertex) {
        return stream << input_vertex.x << input_vertex.y;
    }

    double dot(const Vertex &input_vertex) const {
        return x * input_vertex.x + y * input_vertex.y;
    }

    double cross(const Vertex &input_vertex) const {
        return x * input_vertex.y - y * input_vertex.x;
    }

    double before_norm() const {
        return x * x + y * y;
    }

    double norm() const {
        return sqrt(before_norm());
    }

    Vertex rotate_orthant() const {
        return Vertex{y, -x};
    }

    Vertex rotate_theta(double theta) {
        return Vertex(cos(theta) * x - sin(theta) * y, sin(theta) * x + cos(theta) * y);
    }

    int orthant() const {
        if (x == 0 && y == 0) return 1;
        if (x > 0) return y > 0 ? 1 : 4;
        return y > 0 ? 2 : 3;
    }

    bool operator<(const Vertex &input_vertex) const {
        int my_orthant = orthant(), input_orthant = input_vertex.orthant();
        if (my_orthant != input_orthant) return my_orthant < input_orthant;
        return cross(input_vertex) > 0;
    }
};

int main() {
    int N;
    cin >> N;
    vector<Vertex> engines(N);
    for (int i = 0; i < N; i++) cin >> engines[i];
    sort(engines.begin(), engines.end());
    double ans = 0;
    for (int i = 0; i < N; i++) {
        Vertex temp;
        for (int j = 0; j < N; j++) {
            temp += engines[(i + j) % N];
            ans = max(ans, temp.norm());
        }
    }
    cout << fixed << setprecision(20) << ans << endl;
}

Measured memory_bytes: 256