require 'complex'
n = gets.to_i
a = []
b = []
n.times do |i|
  a[i],b[i] = gets.chomp.split(" ").map(&:to_i)
end
max = 0
n.times do |i|
  (0...n).to_a.combination(i+1).each do |j|
    al = 0
    bl = 0
    j.each do |k|
      al += a[k]
      bl += b[k]
    end
    ll = al*al+bl*bl
    max = ll if max < ll
  end
end
print("#{Math.sqrt(max)}")
