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)
  local used = {}
  for j = 1, n - 1 do
    used[j] = false
  end
  local needreset = true
  while needreset do
    needreset = false
    for j = 1, n - 1 do
      if not used[j] then
        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
        local isok = false
        if nxt_rad - cur_rad <= halfpi then
          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)
          used[j] = true
        else
          local candx = cur_x + nxt_x
          local candy = cur_y + nxt_y
          if cur_len < msq(candx * candx + candy * candy) then
            used[j] = true
            needreset = true
            cur_x = candx
            cur_y = candy
            cur_rad = at2(cur_y, cur_x)
            cur_len = msq(cur_x * cur_x + cur_y * cur_y)
          end
        end
      end
    end
  end
  maxlen = mma(maxlen, cur_len)
end
print(string.format("%.13f", maxlen))
