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

ans = 0
wk = E.select{|c| c.real >= 0 && c.imag >= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs
wk = E.select{|c| c.real <= 0 && c.imag >= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs
wk = E.select{|c| c.real <= 0 && c.imag <= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs
wk = E.select{|c| c.real >= 0 && c.imag <= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs
wk = E.select{|c| c.real >= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs
wk = E.select{|c| c.real <= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs
wk = E.select{|c| c.imag >= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs
wk = E.select{|c| c.imag <= 0}.inject(0){|r, c| r += c}
ans = wk.abs if ans < wk.abs

puts ans
