n = gets.to_i
pos = []
n.times do
  pos << gets.split.map(&:to_i)
end
pos.sort_by!{|x,y| Math.atan2(y,x)}

pos += pos

ans = 0
n.times do |i|
  cur = [0,0]
  n.times do |j|
    cur[0] += pos[i+j][0]
    cur[1] += pos[i+j][1]
    t = cur[0]**2 + cur[1]**2
    ans = t if t > ans
  end
end
p ans**0.5