def arg(x,y)
  Math.atan2(y,x)
end

N=gets.to_i
E=N.times.map{gets.split.map(&:to_i)}.sort{|e|arg(*e)}

ans=0
N.times do |i|
  x,y=*E[i]
  used=[]
  used[i]=true
  N.times do
    nx,ny=x,y
    N.times do |j|
      next if used[j]
      used[j]=true
      d=arg(*E[j])-arg(x,y)
      d+=2*Math::PI if d < 0
      next if Math::PI/2.0 < d
      nx+=E[j][0]
      ny+=E[j][1]
    end
    x,y=nx,ny
  end
  p [x,y]
  ans=[ans,x**2+y**2].max
end
p Math.sqrt(ans)
