//code by lynmisakura.wish to be accepted!
/****************************/
#include<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
#include<algorithm>
#include<bitset>
#include <climits>
#include<set>
#include<bitset>
using namespace std;
/***************************/
typedef long long ll;
typedef pair<int,int> pi;
typedef vector<pair<int,int>> vpi;

const long long INF = 1LL << 55;

#define itn int
#define endl '\n'
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define mins(x,y) x = min(x,y)
#define maxs(x,y) x = max(x,y)
#define all(x) (x).begin(),(x).end()
#define Rep(n) for(int i = 0;i < n;i++)
#define rep(i,n) for(int i = 0;i < n;i++)
#define rrep(i,n) for(int i = n - 1;i >= 0;i--)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() )
 
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll qp(ll a, ll b) { ll ans = 1; do { if (b & 1)ans = 1ll * ans*a; a = 1ll * a*a; } while (b >>= 1); return ans; }
ll qp(ll a, ll b, int mo) { ll ans = 1; do { if (b & 1)ans = 1ll * ans*a%mo; a = 1ll * a*a%mo; } while (b >>= 1); return ans; }
 
#define _GLIBCXX_DEBUG
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

//mint
const int mod = 998244353;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }
 
  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};

/******************************************/
int n;
ll x[101],y[101];

/*****************************************/

int main(void){
   cin.tie(0);
   ios::sync_with_stdio(false);
   cin >> n;
   double pie = 3.1415926535897932384626433;
   vector<pair<double,pair<double,double>>> a;
   rep(i,n){
      double x,y;cin >> x >> y;
      if(x == (double)0 && y == (double)0) continue;
      double length = sqrt(x*x + y*y);
      double ag = (double)180 * acos(x/length) / pie;
      if(y < 0) ag = (double)360 - ag;
      // cout << ag << endl;
      a.pb(mp(ag,mp(x,y)));
   }
   n = a.size();
   sort(all(a));
   // for(auto i : a) cout << i.ff << " " << i.ss.ff << " " << i.ss.ss << endl;
   double ans = 0;
   for(double i = 0;i < 360;i+=1.0){
      double e = i;
      double lx = 0,ly = 0;
      for(int j = 0;j < n;j++){
         double dg = e - a[j].ff;
         if(dg < (double)0) dg = -dg;
         if(min(dg,(double)360 - dg) <= (double)90){
            lx += a[j].ss.ff;
            ly += a[j].ss.ss;
         }
      }
      //if(lx > 0 || ly > 0) cout << lx << " " << ly << endl;
      double leng = sqrt(lx*lx + ly*ly);
      ans = max(ans,leng);
   }
   cout << fixed;
   cout << setprecision(20) << ans << endl;
   return 0;
}


Measured memory_bytes: 256