N = gets.to_i
E = []
N.times{|i|
  x, y = gets.chomp.split(" ").map(&:to_i)
  next if x == 0 && y == 0
  E << Complex(x, y)
}

def solve(ans, c, lst, all)
  if c.angle > 0 then
    wk1 = E.select{|e| c.angle <= e.angle || e.angle < (c.angle - Math::PI)}.inject(&:+)
    wk2 = E.select{|e| c.angle < e.angle || e.angle <= (c.angle - Math::PI)}.inject(&:+)
  else
    wk1 = E.select{|e| c.angle <= e.angle && e.angle < (c.angle + Math::PI)}.inject(&:+)
    wk2 = E.select{|e| c.angle < e.angle && e.angle <= (c.angle + Math::PI)}.inject(&:+)
  end
  wk1 = 0 if wk1.nil?
  wk2 = 0 if wk2.nil?
  [ans, wk1.abs, wk2.abs, (all - wk1).abs, (all - wk2).abs].max
end

all = E.inject(&:+)
ans = 0
E.each{|e|
  ans = solve(ans, e, E.dup, all)
}

puts ans
