nn = gets.to_i
xy = nn.times.map{gets.split.map(&:to_i)}

max=0
# 点の位置で分類、象限と軸上の8。それぞれを足す
s1=Array.new(2,0)
s2=Array.new(2,0)
s3=Array.new(2,0)
s4=Array.new(2,0)
z1=Array.new(2,0)
z2=Array.new(2,0)
z3=Array.new(2,0)
z4=Array.new(2,0)
pat = [s1,s2,s3,s4,z1,z2,z3,z4]

xy.each do |x,y|
  # 軸上
  if x==0
    if y>0
      z1[1]+=y
    else
      z3[1]+=y
    end
  elsif y==0
    if x>0
      z2[0]+=x
    else
      z4[0]+=x
    end
  # しょうげん
  elsif x>0
    if y>0
      s1[0]+=x
      s1[1]+=y
    else
      s2[0]+=x
      s2[1]+=y
    end
  else
    if y>0
      s4[0]+=x
      s4[1]+=y
    else
      s3[0]+=x
      s3[1]+=y
    end
  end
end
#puts pat.to_s

# 全パターン試す
1.upto(2**8-1) do |n|
  sum = Array.new(2,0)
  bin=("%08d" % n.to_s(2)).chars
  bin.each_with_index do |b,i|
    if b=="1"
      sum[0]+=pat[i][0]
      sum[1]+=pat[i][1]
    end
  end
  sum = Math.sqrt(sum[0]**2+sum[1]**2)
  #puts "bin:#{bin},sum:#{sum}"
  if max < sum
    max = sum
  end
end
puts max
