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
n.times do |j|
  ll = a[j]*a[j]+b[j]*b[j]
  al = a[j]
  bl = b[j]
  n.times do |i|
    next if i == j
    lls = (al+a[i])*(al+a[i]) + (bl+b[i])*(bl+b[i])
    if ll < lls
      ll = lls
      al += a[i]
      bl += b[i]
    end
  end
  max = ll if max < ll
end
#print("#{max}")
print("#{Math.sqrt(max)}")