import std.algorithm;
import std.bigint;
import std.concurrency;
import std.container;
import std.conv;
import std.functional;
import std.format;
import std.math;
import std.meta;
import std.random;
import std.range;
import std.stdio;
import std.string;
import std.traits;
import std.typecons;


auto solve(int N, long[] x, long[] y) {
    auto engines = zip(x, y)
        .map!(t => tuple(atan2(t[1].to!real, t[0].to!real), t[0], t[1]))
        .array
        .sort();
    
    long vec_x;
    long vec_y;
    real ans = 0;

    size_t arrayLength = engines.length;
    bool isValidRange(size_t first, size_t last) {
        if (first == last)
            return true;
        return engines[last][0] - engines[first][0] < PI;
    }
    void pushFront(size_t i) {
        vec_x += engines[i][1];
        vec_y += engines[i][2];
    }
    void popBack(size_t i) {
        vec_x -= engines[i][1];
        vec_y -= engines[i][2];
    }
    void processRange() {
        auto x = vec_x.to!real;
        auto y = vec_y.to!real;
        ans = ans.max(sqrt(x * x + y * y));
    }

    TwoPointers(
        arrayLength,
        &isValidRange,
        &pushFront,
        &popBack,
        &processRange
    ).run;

    return format("%.11f", ans);
}


struct TwoPointers {
private:
    size_t arrayLength;
    bool delegate(size_t, size_t) isValidRange;
    void delegate(size_t) pushFront;
    void delegate(size_t) popBack;
    void delegate() processRange;

    size_t first = 0;
    size_t last = 0;

    @property
    bool empty() {
        return first > last;
    }

    @property
    bool existsNext() {
        return last + 1 < arrayLength;
    }

public:
    void run() {
        pushFront(0);
        first = 0;
        last = 0;

        do {
            while (empty || (existsNext && isValidRange(first, last + 1))) {
                last++;
                pushFront(last);
            }
            processRange();
            popBack(first);
            first++;
        } while (first < arrayLength && existsNext);
    }
}


void main() {
    auto input = stdin.byLine.map!split.joiner;

    int N;
    N = input.front.to!int;
    input.popFront;

    long[] x = new long[](cast(size_t) (N));
    long[] y = new long[](cast(size_t) (N));
    foreach (i; 0 .. cast(size_t) (N)) {
        x[i] = input.front.to!long;
        input.popFront;
        y[i] = input.front.to!long;
        input.popFront;
    }

    static if (is(ReturnType!solve == void))
        solve(N, x, y);
    else
        solve(N, x, y).writeln;
}
