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

d = ->(xys){Math.hypot(*xys.inject([0, 0]){|(xs, ys), (x, y)| [xs += x, ys += y]})}
xys = XYs.sort_by{|x, y| Math.atan2(y, x)} * 2
puts [*0 ... N].product([*1 .. N]).map{|i, n| d[xys[i, n]]}.max