#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <random>

using namespace std;
 
#define mod 1000000007
#define FOR(x,to) for(int x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define long long long
inline int rei(){int x;cin>>x;return x;}
inline long rel(){long x;cin>>x;return x;}
inline string res(){string x;cin>>x;return x;}
//------------------------------------------------------- 
long X[100];
long Y[100];
void Calc(){
	int N = rei();
	for(int i=0;i<N;i++){
		X[i] = rei();
		Y[i] = rei();
	}
	long ans = 0;
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] >= 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] <= 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*X[j]+Y[i]*Y[j] >= 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*X[j] + Y[i]*Y[j] <= 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] > 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] < 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*X[j]+Y[i]*Y[j] > 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*X[j] + Y[i]*Y[j] < 0){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] > 0 || (X[i]*Y[j] - X[j]*Y[i] == 0 && X[i]*X[j] + Y[i]*Y[j] > 0)){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] > 0 || (X[i]*Y[j] - X[j]*Y[i] == 0 && X[i]*X[j] + Y[i]*Y[j] < 0)){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] < 0 || (X[i]*Y[j] - X[j]*Y[i] == 0 && X[i]*X[j] + Y[i]*Y[j] > 0)){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	for(int i=0;i<N;i++){
		long x = 0;
		long y = 0;
		for(int j=0;j<N;j++){
			if(X[i]*Y[j] - X[j]*Y[i] < 0 || (X[i]*Y[j] - X[j]*Y[i] == 0 && X[i]*X[j] + Y[i]*Y[j] < 0)){
				x += X[j];
				y += Y[j];	
			}
		}
		ans = max(ans,x*x+y*y);
	}
	printf("%1.10lf\n",sqrt((double)(ans)));
}
int main(int argc,char** argv){
	ios::sync_with_stdio(false), cin.tie(0);
	cout.tie(0); Calc(); return 0;
}

Measured memory_bytes: 256