local n = io.read("*n")
local t = {}
for i = 1, n do
  local x, y = io.read("*n", "*n")
  if x ~= 0 or y ~= 0 then
    table.insert(t, {x, y})
  end
end
n = #t
local at2 = math.atan2
table.sort(t, function(a, b)
  return at2(a[2], a[1]) < at2(b[2], b[1])
end
)
local mma, msq = math.max, math.sqrt
local maxlen = 0
local halfpi = math.pi / 2
local pi2 = math.pi * 2
for i_start = 1, n do
  local cur_x, cur_y = t[i_start][1], t[i_start][2]
  local cur_rad = at2(cur_y, cur_x)
  local cur_len = msq(cur_x * cur_x + cur_y * cur_y)
  maxlen = mma(maxlen, cur_len)
  for j = 1, n - 1 do
    local pos = i_start + j
    local up = false
    if n < pos then
      pos = pos - n
      up = true
    end
    local nxt_x, nxt_y = t[pos][1], t[pos][2]
    local nxt_rad = at2(nxt_y, nxt_x)
    if up then
      nxt_rad = nxt_rad + pi2
    end
    if halfpi < nxt_rad - cur_rad then
      break
    else
      cur_x = cur_x + nxt_x
      cur_y = cur_y + nxt_y
      cur_rad = at2(cur_y, cur_x)
      cur_len = msq(cur_x * cur_x + cur_y * cur_y)
    end
  end
  maxlen = mma(maxlen, cur_len)
end
print(string.format("%.13f", maxlen))
