N = gets.to_i
Ps = (0...N).map{
  gets.split.map &:to_f
}.sort_by{ |x,y| Math.atan2(x,y) }

Ds = Ps + Ps

R2 = (0...N).map{ |k|
  v = [*Ds[k]]
  Ds[k+1...k+N].reduce(v[0]**2 + v[1]**2){ |r,v2|
    v[0] += v2[0]; v[1] += v2[1]
    [r, v[0]**2 + v[1]**2].max
  }
}.max

puts Math.sqrt(R2)
