n = gets.to_i
ps = []

n.times do |i|
  ps << gets.split.map(&:to_i)
end

ps.sort_by! { |xy| Math.atan2(xy[1], xy[0]) }

ps = ps + ps

mx = 0
n.times do |s|
  s.upto(s + n - 1) do |e|
    xsum = 0
    ysum = 0
    for i in s..e
      xsum += ps[i][0]
      ysum += ps[i][1]
    end

    mx = [xsum * xsum + ysum * ysum, mx].max
  end
end

p Math.sqrt(mx)
