N = gets.to_i
XYs = readlines.map{|l| l.split.map(&:to_i)}

xs, ys, xcs, ycs = 0, 0, [0], [0]; XYs.each{|x, y| xcs << (xs += x); ycs << (ys += y)}
xyts = XYs.map{|x, y| [x, y, Math.atan2(y, x)]}.sort_by{|_, _, t| t}
is = N.times.map{|i| xyts.bsearch_index{|x, y, t| t >= xyts[i][2] + Math::PI} || N}
puts Math.sqrt(is.map.with_index{|i, j| (xcs[i] - xcs[j])**2 + (ycs[i] - ycs[j])**2}.max)