#include <iostream>
#include <string>
#include <vector>
#include <algorithm> // sort
#include <map> // pair
#include <queue>
#include<iomanip>
#include <cmath>
#include <set>

#define ABS(x) ((x)>0?(x):-(x))
#define MIN(x,y) ((x)>(y)?(y):(x))
#define MAX(x,y) ((x)<(y)?(y):(x))

#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

#define INF 1000000000

using namespace std;
typedef long long ll;

ll newton(long long int a, long long int  b)
{
	if(a==b)
		return a;
	while(a != 0 && b != 0)
	{
		if(a > b)
		{
			b += a;
			a = b-a;
			b -= a;
		}
		b %= a;
	}
	return a;
}

struct UnionFind {
	vector<int> p;
	UnionFind(int N):p(N)
	{
		for(int i=0; i< N; i++)
		{
			p[i] = i;
		}
	}
	int root(int x)
	{
		if(p[x] == x)
			return x;
		return p[x] = root(p[x]);
	}
	void unite(int x, int y)
	{
		int rx = root(x);
		int ry = root(y);
		if(rx == ry) return;
		p[rx] = ry;
	}
	bool issame(int x, int y)
	{
		int rx = root(x);
		int ry = root(y);
		return rx == ry;
	}
};

//大きな数に対する割り算をするとき、MODを指定することで掛け算の値に変換できる

ll div2mul_calc(ll a, ll b, ll m)
{
	if (b == 0) {
        return 1;
    } else if (b % 2 == 0) {
        ll d = div2mul_calc(a, b / 2, m);
        return (d * d) % m;
    } else {
        return (a * div2mul_calc(a, b - 1, m)) % m;
    }
}
ll div2mul(ll n, ll mod)
{
	return div2mul_calc(n, mod-2, mod);
}

ll twoRow(ll a, ll b, ll mod)
{
	ll ret = 1;
	for(ll i = 1 ;i <= a+b;++i)
	{
		ret *= i;
		ret %= mod;
	}
	for(ll i = 1 ;i <= a;++i)
	{
		ret *= div2mul(i,mod);
		ret %= mod;
	}
	for(ll i = 1 ;i <= b;++i)
	{
		ret *= div2mul(i,mod);
		ret %= mod;
	}
	return ret;
}

struct edge {
    int from; //出発点
    int to;   //到達点
    int cost; //移動コスト
};

vector< ll > divisor(ll n) {
  vector< ll > ret;
  for(ll i = 1; i * i <= n; i++) {
    if(n % i == 0) {
      ret.push_back(i);
      if(i * i != n) ret.push_back(n / i);
    }
  }
  sort(ret.begin(), ret.end());
  return (ret);
}
int main()
{
	ll N;
	ll i,j,k;
	cin >> N;
	vector<pair<ll,ll> > v;
	vector<pair<double,int> > up;
	vector<pair<double,int> > down;
	vector<int> row;
	for(i=0;i<N;++i)
	{
		cin>>j>>k;
		v.push_back(make_pair(j,k));
		if(k>0)
		{
			up.push_back(make_pair((double)-j/k, i));
		}
		else if(k<0)
		{
			down.push_back(make_pair((double)-j/k, i));
		}
	}
	sort(up.begin(), up.end());
	sort(down.begin(), down.end());



	for(i=0;i<N;++i)
	{
		j = v[i].first;
		k = v[i].second;
		if(k==0)
		{
			if(j>0)
				row.push_back(i);
		}
	}
	for(i=0;i<up.size();++i)
	{
		row.push_back(up[i].second);
	}
	for(i=0;i<N;++i)
	{
		j = v[i].first;
		k = v[i].second;
		if(k==0)
		{
			if(j<0)
				row.push_back(i);
		}
	}
	for(i=0;i<down.size();++i)
	{
		row.push_back(down[i].second);
	}



	for(i=0;i<N;++i)
	{
		j = v[i].first;
		k = v[i].second;
		if(k==0)
		{
			if(j>0)
				row.push_back(i);
		}
	}
	for(i=0;i<up.size();++i)
	{
		row.push_back(up[i].second);
	}
	for(i=0;i<N;++i)
	{
		j = v[i].first;
		k = v[i].second;
		if(k==0)
		{
			if(j<0)
				row.push_back(i);
		}
	}
	for(i=0;i<down.size();++i)
	{
		row.push_back(down[i].second);
	}


	int end_point = 0;
	ll max_ans = 0;
	for(i=0;i<N;++i)
	{
		for(;end_point<N*2&&end_point-i < row.size()/2;++end_point)
		{
			if((v[row[i]].first*v[row[end_point]].second - v[row[i]].second*v[row[end_point]].first)<0)
			{
				break;
			}
		}
		ll c_x = 0;
		ll c_y = 0;
		for(j=i;j<end_point;++j)
		{
			c_x += v[row[j]].first;
			
			c_y += v[row[j]].second;
			if(c_x*c_x+c_y*c_y > max_ans)
			{
				max_ans = c_x*c_x+c_y*c_y;
			}
		}
	}
	cout << std::setprecision(20) << sqrt(max_ans) << endl;
	return 0;
}




















Measured memory_bytes: 256