#include <bits/stdc++.h>

#define f first
#define s second
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define ll long long
#define ull unsigned long long
#define db double
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pli pair<ll, int>
#define px pair<db, db>
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define input(a) for (auto& el : a) cin >> el;
#define output(a) cout << '!'; for (auto& el : a) cout << el << ' '; cout << '\n'; cout.flush();
#define sz(el) int(el.size())
#define sq(a) ((a) * (a))
#define xll bitset<128>
#define xmin(a,b) a = min(a, b)
#define xmax(a,b) a = max(a, b)
#define sun(a) sort(all(a)); a.resize(unique(all(a)) - a.begin());
/**/  /// extra
//#define forn(i,n) for (int i = 0; i < n; ++i)
//#define rforn(i,n) for (int i = n - 1; i >= 0; --i)
#define bn '\n'
#define vi vector<int>
#define vii vector<vi>
#define vl vector<ll>
#define vll vector<vl>
//#define G vector<vector<pii>>
#define GVE vector<vector<edge>>
#define usi unordered_set<int>
#define usp set<pii>
/**/

using namespace std;

const int INF = 1'000'000'017;
const ll LLINF = 1'000'000'000'000'000'017LL;
const ld inf = 1.0 / 0.0;
const ld eps = 1e-9;
const int MOD = 998244353;

//mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

//uniform_int_distribution<int> uid(l, r); [l, r]
//int x = uid(rng);

/// Author: @mathalex
namespace geometry {
    const ld PI = atan2(0, -1);
    const ld EPS = 1e-8;

    struct Point {
        ll x = 0, y = 0;

        Point() {}

        Point(const ll& x, const ll& y) : x(x), y(y) {}

        bool operator==(const Point& a) const {
            return abs(x - a.x) < EPS && abs(y - a.y) < EPS;
        }

        bool operator!=(const Point& a) const {
            return (x - a.x) > EPS || (y - a.y) > EPS;
        }

        bool operator<(const Point& a) const {
            return x < a.x || (x == a.x && y < a.y);
        }

        bool operator>(const Point& a) const {
            return x > a.x || (x == a.x && y > a.y);
        }

        Point operator+(const Point& a) const {
            return {x + a.x, y + a.y};
        }

        Point operator-(const Point& a) const {
            return {x - a.x, y - a.y};
        }

        Point operator*(const ll& a) const {
            return {x * a, y * a};
        }

        Point operator/(const ll& a) const {
            return {x / a, y / a};
        }
    };

    struct Vector {
        ll x = 0, y = 0;

        Vector() {}

        Vector(const ll& x, const ll& y) : x(x), y(y) {}

        Vector(const Point& a) : x(a.x), y(a.y) {}

        Vector(const Point& a, const Point& b) : x(b.x - a.x), y(b.y - a.y) {}

        Vector operator-() const {
            return {-x, -y};
        }

        Vector operator+(const Vector& a) const {
            return {x + a.x, y + a.y};
        }

        void operator+=(const Vector& a) {
            x += a.x;
            y += a.y;
        }

        Vector operator-(const Vector& a) const {
            return {x - a.x, y - a.y};
        }

        void operator-=(const Vector& a) {
            x -= a.x;
            y -= a.y;
        }

        ll operator*(const Vector& a) const {
            return a.x * x + a.y * y;
        }

        ll operator%(const Vector& a) const {
            return a.y * x - a.x * y;
        }

        Vector operator*(const ll& r) const {
            return {x * r, y * r};
        }

        void operator*=(const ll& r) {
            x *= r;
            y *= r;
        }

        Vector operator/(const ll& r) const {
            return {x / r, y / r};
        }

        void operator/=(const ll& r) {
            x /= r;
            y /= r;
        }

        ld len() const {
            return sqrt(x * x + y * y);
        }
    };

    struct Line {
        ll a = 0, b = 0, c = 0;

        Line() {}

        Line(const ll& a, const ll& b, const ll& c) : a(a), b(b), c(c) {}

        Line(const Point& a, const Point& b) : a(b.y - a.y), b(a.x - b.x), c(a.y * b.x - a.x * b.y) {}

        Line(const Point& p, const Vector& v) : a(v.y), b(-v.x), c(p.y * v.x - p.x * v.y) {}

        bool operator==(const Line& x) const {
            return (abs(a * x.b - b * x.a) < EPS &&
                    abs(a * x.c - c * x.a) < EPS &&
                    abs(b * x.c - c * x.b) < EPS);
        }
    };

    ld angle(const Vector& v, const Vector& u) {
        return abs(atan2(v % u, v * u));
    }

    ld angleOrient(const Vector& v, const Vector& u) {
        return atan2(v % u, v * u);
    }

    ll ptLine(const Point& a, const Line& line) {
        return line.a * a.x + line.b * a.y + line.c;
    }

    ld dist(const Point& a, const Point& b) {
        return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
    }

    ld dist(const Point& a, const Line& line) {
        return abs(ptLine(a, line)) / sqrt(line.a * line.a + line.b * line.b);
    }

    ld ordist(const Point& a, const Line& line) {
        return ptLine(a, line) / sqrt(line.a * line.a + line.b * line.b);
    }

    ld dist(const Point& p, const Point& a, const Point& b, bool p1, bool p2) {
        if (p1 && Vector(a, p) * Vector(a, b) < 0) {
            return dist(p, a);
        }
        if (p2 && Vector(b, p) * Vector(b, a) < 0) {
            return dist(p, b);
        }
        return dist(p, Line(a, b));
    }

    int part(const Vector& a, const Vector& c) {  /// parts for polar sorting
        if (a.x >= c.x) {
            return (a.y >= c.y ? 1 : 2);
        } else {
            return (a.y > c.y ? 1 : 2);
        }
    }

    void norm(Vector& a, const ld& r) {  /// parameters of Vector should be long double
        ld d = sqrt(a.x * a.x + a.y * a.y);
        a.x /= d;
        a.y /= d;
        a.x *= r;
        a.y *= r;
    }

    bool intersect(const Line& a, const Line& b, Point& p) {
        if (a.a * b.b - b.a * a.b == 0) {
            return 0;
        }
        p = Point((b.c * a.b - a.c * b.b) / (a.a * b.b - b.a * a.b), (a.a * b.c - b.a * a.c) / (b.a * a.b - a.a * b.b));
        return 1;
    }

    Line angle90(const Line& a, const Point& b) {
        return Line(b, Point(b.x + a.a, b.y + a.b));
    }

    bool signEqual(const ll& a, const ll& b) {  /// for very big numbers
        return (a >= 0 && b >= 0) || (a <= 0 && b <= 0);
    }

    bool sgnCheck(const ld& a, const ld& b) {
        return max(a, b) >= 0 && min(a, b) <= 0;
    }

    bool between(const Point& a, const Point& b, const Point& c) {
        return min(a.x, c.x) <= b.x && b.x <= max(a.x, c.x) && min(a.y, c.y) <= b.y && b.y <= max(a.y, c.y);
    }

    bool intersect(const Point& a, const Point& b, const Point& c, const Point& d) {
        Vector v1(a, b), v2(c, d), u1(a, c), u2(a, d), u3(c, a), u4(c, b);
        if (sgnCheck((v1 % u1), (v1 % u2)) && sgnCheck((v2 % u3), (v2 % u4))) {
            if (ptLine(c, Line(a, b)) == 0 && ptLine(d, Line(a, b)) == 0 && !between(a, c, b) && !between(a, d, b) && !between(c, a, d) && !between(c, b, d)) {
                return 0;
            } else {
                return 1;
            }
        } else {
            return 0;
        }
    }

    bool pointIntoAngle(const Point& a, const Point& c, const Point& b, const Point& p) {  /// left, center, right, dot
        Vector ca(c, a), ap(a, p), ab(a, b), ba(b, a), cb(c, b), bp(b, p), cp(c, p);
        return (cp % ca == 0 && cp * ca >= 0) || (cp % cb == 0 && cp * cb >= 0) ||
        (signEqual(ca % ap, ca % ab) && signEqual(cb % bp, cb % ba));
    }

    int into(const vector<Point>& pts, const Point& a) {  /// bool, point into the polygon
        int n = sz(pts);
        if (!pointIntoAngle(pts[1], pts[0], pts[n - 1], a)) {
            return 0;
        }
        int left = 1, right = n - 1;
        while (left < right - 1) {
            int mid = (left + right) / 2;
            if (pointIntoAngle(pts[left], pts[0], pts[mid], a)) {
                right = mid;
            } else {
                left = mid;
            }
        }
        return pointIntoAngle(pts[left], pts[0], pts[right], a) && pointIntoAngle(pts[0], pts[left], pts[right], a);
    }

    Point operator+(const Point& a, const Vector& v) {
        return {a.x + v.x, a.y + v.y};
    }

    Point operator-(const Point& a, const Vector& v) {
        return {a.x - v.x, a.y - v.y};
    }

    struct Circle {
        Point c;
        ll r = 0;

        Circle() {}

        Circle(const Point& c, const ll& r) : c(c), r(r) {}

        Circle(const Point& a, const Point& b) : c((a + b) / 2), r(dist(a, b) / 2) {}

        Circle(const Point& a, const Point& b, const Point& cx) {
            Line l = angle90(Line(a, b), (a + b) / 2), m = angle90(Line(b, cx), (b + cx) / 2);
            if (!intersect(l, m, c)) {
                vector<Point> z = {a, b, c};
                sort(all(z));
                c = (z[0] + z[2]) / 2;
                r = dist(z[0], z[2]);
            } else {
                r = dist(c, a);
            }
        }
    };

    bool into(const Circle& c, const Point& p) {
        return dist(c.c, p) <= c.r;
    }

    int intersect(const Circle& c, const Line& s, vector<Point>& pts) {
        ld d = dist(c.c, s);
        Vector v(s.a, s.b);
        norm(v, d);
        Point p1 = c.c + v, p2 = c.c - v;
        if (d > c.r) {
            return 0;
        } else if (abs(d - c.r) < EPS) {
            if (abs(ptLine(p1, s)) < EPS) {
                pts.emplace_back(p1);
            } else {
                pts.emplace_back(p2);
            }
            return 1;
        } else {
            if (abs(ptLine(p2, s)) < EPS) {
                p1 = p2;
            }
            Vector u(-s.b, s.a);
            ld q = sqrt(c.r * c.r - d * d);
            norm(u, q);
            Point p3 = p1 + u, p4 = p1 - u;
            pts.emplace_back(p3);
            pts.emplace_back(p4);
            return 2;
        }
    }

    int intersect(Circle c1, Circle c2, vector<Point>& pts) {
        if (c1.r > c2.r) {
            swap(c1, c2);
        }
        if (c1.c == c2.c && c1.r == c2.r) {
            return 3;
        } else if (c1.r < c2.r - dist(c1.c, c2.c)) {
            return 0;
        } else {
            Line s(2 * (c2.c.x - c1.c.x), 2 * (c2.c.y - c1.c.y),
                   c1.c.x * c1.c.x + c1.c.y * c1.c.y - c2.c.x * c2.c.x - c2.c.y * c2.c.y - c1.r * c1.r + c2.r * c2.r);
            return intersect(c1, s, pts);
        }
    }

    int tangent(const Circle& c, const Point& p, vector<Point>& pts) {
        ld d = dist(c.c, p);
        if (d * d - c.r * c.r < 0) {
            return 0;
        }
        Circle tmp(p, sqrt(d * d - c.r * c.r));
        return intersect(c, tmp, pts);
    }

    vector<Point> convexHull(vector<Point> p) {  /// we shouldn't change the vector of points
        Point opt = *min_element(all(p));
        sort(all(p), [&opt](const Point& a, const Point& b) {
            ll t = Vector(opt, a) % Vector(opt, b);
            return (t == 0 ? dist(opt, a) < dist(opt, b) : t > 0);
        });
        p.resize(unique(all(p)) - p.begin());
        vector<Point> ans;
        for (auto& el : p) {
            while (sz(ans) > 1 && Vector(ans[sz(ans) - 2], ans.back()) % Vector(ans.back(), el) <= 0) {
                ans.pop_back();
            }
            ans.eb(el);
        }
        return ans;
    }

    int part(const Vector& a) {
        if (a.y > 0 || (a.y == 0 && a.x > 0)) {
            return 1;
        }
        return -1;
    }

    bool cmp(const Vector& a, const Vector& b) {
        int pa = part(a), pb = part(b);
        if (pa < pb) {
            return 0;
        } else if (pa > pb) {
            return 1;
        }
        return a % b > 0;
    }

    bool xp(const Point& a, const Point& b) {
        return a.y < b.y || (a.y == b.y && a.x < b.x);
    }

    vector<Point> mink(vector<Point> a, vector<Point> b) {
        int n = sz(a), m = sz(b);
        rotate(a.begin(), min_element(all(a), xp), a.end());
        rotate(b.begin(), min_element(all(b), xp), b.end());
        a.eb(a[0]);
        b.eb(b[0]);
        vector<Vector> av(n), bv(m);
        for (int i = 0; i < n; ++i) {
            av[i] = Vector(a[i], a[i + 1]);
        }
        for (int i = 0; i < m; ++i) {
            bv[i] = Vector(b[i], b[i + 1]);
        }
        vector<Vector> cv(n + m);
        merge(all(av), all(bv), cv.begin(), cmp);
        vector<Point> res;
        Point x = a[0] + b[0];
        for (Vector& v : cv) {
            res.eb(x);
            x = x + v;
        }
        return res;
    }

    ld per(const vector<Point>& p) {
        ld ans = 0;
        for (int i = 0; i < sz(p); ++i) {
            ans += dist(p[i], p[(i + 1 == sz(p) ? 0 : i + 1)]);
        }
        return ans;
    }

    ld sup(const vector<Point>& p) {
        ld ans = 0;
        Point opt(0, 0);
        for (int i = 0; i < sz(p); ++i) {
            ans += Vector(opt, p[i]) % Vector(opt, p[(i + 1 == sz(p) ? 0 : i + 1)]);
        }
        return ans / 2;
    }

    istream& operator>>(istream& in, Point& a) {
        return (in >> a.x >> a.y);
    }

    ostream& operator<<(ostream& out, const Point& a) {
        return (out << a.x << ' ' << a.y << '\n');
    }

    istream& operator>>(istream& in, Vector& a) {
        return (in >> a.x >> a.y);
    }

    ostream& operator<<(ostream& out, const Vector& a) {
        return (out << a.x << ' ' << a.y << '\n');
    }

    istream& operator>>(istream& in, Line& a) {
        return (in >> a.a >> a.b >> a.c);
    }

    ostream& operator<<(ostream& out, const Line& a) {
        return (out << a.a << ' ' << a.b << ' ' << a.c << '\n');
    }

    istream& operator>>(istream& in, Circle& a) {
        return (in >> a.c >> a.r);
    }

    ostream& operator<<(ostream& out, const Circle& a) {
        return (out << a.c << a.r << '\n');
    }
}

using namespace geometry;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;
    vector<Vector> a;
    for (int i = 0; i < n; ++i) {
        Vector x;
        cin >> x;
        if (x.x != 0 || x.y != 0) {
            a.eb(x);
        }
        //cout << atan2(a[i].y, a[i].x) << '\n';
    }
    n = sz(a);
    sort(all(a), cmp);
    ll len = 0;
    for (int i = 0; i < n; ++i) {
        Vector cur(0, 0);
        for (int j = 0; j < n; ++j) {
            cur += a[(i + j) % n];
            xmax(len, cur.x * cur.x + cur.y * cur.y);
        }
    }
    cout << setprecision(15) << fixed << sqrt(len * (ld) 1);
    return 0;
}


Measured memory_bytes: 256