#include <bits/stdc++.h>


using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define reps(i,n) for (int i = 1; i <= (int)(n); ++i)
#define repd(i,n) for (int i = (int)(n - 1); i >= 0; --i)
#define repds(i,n) for (int i = (int)(n); i > 0; --i)
#define loop(i,x,n) for (int i = (int)x; i < n; ++i)
#define loops(i,x,n) for (int i = (int)x; i <= n; ++i)
#define loopd(i,x,n) for (int i = (int)x; i > n; --i)
#define loopds(i,x,n) for (int i = (int)x; i >= n; --i)
#define itrep(i,s) for (auto i = begin(s); i != end(s); ++i)
#define itrepd(i,s) for (auto i = rbegin(s); i != rend(s); ++i)
#define all(f,x,...) [&](decltype(x)& whole) { return (f)(begin(x), end(x), ##__VA_ARGS__); }(x)
#define rall(f,x,...) [&](decltype(x)& whole) { return (f)(rbegin(x), rend(x), ##__VA_ARGS__); }(x)
using ll = long long;
using ld = long double;
constexpr ll inf = static_cast<ll>(1e17);
constexpr int iinf = static_cast<int>(1e9);
constexpr double dinf = 1e10;
constexpr ld ldinf = 1e17;
ll mod = static_cast<ll>(1e9 + 7);
std::ostream& endn(std::ostream& os) { return os.put(os.widen('\n')); }
template<class T> constexpr int sz(const T& a) { return (int)a.size(); }
template<class T, class ... Args> constexpr void mins(T& a, Args... args) { a = min<T>({ a, args... }); }
template<class T, class... Args> constexpr void maxs(T& a, Args... args) { a = max<T>({ a,args... }); }
template<class T> constexpr T ceiling(const T a, const T b) { return (a + b - 1) / b; }
ll plusMod(ll& a, const ll b) { return a = (a + b) % mod; }
template<typename A, size_t N, typename T> constexpr void fillArray(A(&array)[N], const T& val) { std::fill((T*)array, (T*)(array + N), val); }

constexpr double eps = 1e-10;
struct Vec2 {
    double x, y;
    Vec2(double x = 0, double y = 0) : x(x), y(y) {}
    Vec2& operator+=(const Vec2& v) { x += v.x; y += v.y; return *this; }
    Vec2 operator+(const Vec2& v) const { return Vec2(*this) += v; }
    Vec2& operator-=(const Vec2& v) { x -= v.x; y -= v.y; return *this; }
    Vec2 operator-(const Vec2& v) const { return Vec2(*this) -= v; }
    Vec2& operator*=(double s) { x *= s; y *= s; return *this; }
    Vec2 operator*(double s) const { return Vec2(*this) *= s; }
    Vec2& operator/=(double s) { x /= s; y /= s; return *this; }
    Vec2 operator/(double s) const { return Vec2(*this) /= s; }
    double dot(const Vec2& v) const { return x * v.x + y * v.y; }
    double cross(const Vec2& v) const { return x * v.y - v.x * y; }
    double length2() const { return x * x + y * y; }
    double length() const { return sqrt(length2()); }

    int ort() const {
        if (abs(x) < eps && abs(y) < eps) return 0;
        if (y > 0) return x > 0 ? 1 : 2;
        else return x > 0 ? 4 : 3;
    }
    bool operator<(const Vec2& v) const {
        int o = ort(), vo = v.ort();
        if (o != vo) return o < vo;
        return cross(v) > 0;
    }
};

int n;
void solve() {
    cin >> n;

    vector<Vec2> vec(n);
    rep(i, n)
        cin >> vec[i].x >> vec[i].y;

    all(sort, vec);

    double ans = 0.;
    rep(i, n) {
        Vec2 res;
        rep(j, n) {
            auto nj = (i + j) % n;
            res += vec[nj];
            maxs(ans, res.length());
        }
    }

    cout << ans << endn;

}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);

    solve();

    cout << flush;

    return 0;
}


Measured memory_bytes: 256