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()
        .map!(t => t[1]);

    auto cum = new long[][](N * 2, 2);
    cum[0] = engines.front;
    foreach (i, v; chain(engines, engines).enumerate.drop(1))
        cum[i][] = v[] + cum[i - 1][];

    real ans = 0;
    for (int i = 1; i < 2 * N; i++) {
        for (int j = i; j < min(2 * N, i + N); j++) {
            long[] temp = [0, 0];
            temp[] = cum[j][] - cum[i - 1][];
            ans = ans.max(
                temp.map!"a * a"
                .sum
                .to!real
                .sqrt);
        }
    }

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

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;
}
