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

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