N = gets.to_i
Ps = (0...N).map{
  x,y = gets.split.map &:to_f
  theta = Math.atan2(x,y)
  [theta,x,y]
}.sort

Ds = Ps + Ps.map{ |t,x,y| [t+2*Math::PI,x,y] }

#p Ds

R2 = (0...N).map{ |i|
  t,x,y = Ds[i]
  j = (i...2*N).bsearch{ |j| t + Math::PI <= Ds[j][0] } || 2*N
  v = (Ds[i...j] || []).reduce([0,0]){ |a,b| [a[0]+b[1], a[1]+b[2]] }
  r = v[0] ** 2 + v[1] ** 2
  #p Ds[i...j], v,r
  r
}.max

puts Math.sqrt(R2)