require 'complex'
n = gets.to_i
a = []
b = []
n.times do |i|
  a[i],b[i] = gets.chomp.split(" ").map(&:to_i)
end
ll = 0
lls = 0
al = 0
bl = 0
max = 0
droped = [0]
visited = Hash.new(false)
visited[0] = true
until droped.empty?
  id = droped.shift
  ll = a[id]*a[id]+b[id]*b[id]
  al = a[id]
  bl = b[id]
  n.times do |i|
    next if i == id
    lls = (al+a[i])*(al+a[i]) + (bl+b[i])*(bl+b[i])
    if ll < lls
      ll = lls
      al += a[i]
      bl += b[i]
    else
      if visited[i] == false
        droped << i
        visited[i] = true
      end
    end
  end
  max = ll if max < ll
end
#print("#{max}")
print("#{Math.sqrt(max)}")