n = gets.to_i
e = []
n.times {
  e << gets.split.map(&:to_f)
}

d = []

e.each { |x, y|
  dx, dy = e.select{|u,v|x*u+y*v>0}.inject([0,0]){|a,(u,v)|[a[0]+u,a[1]+v]}
  d << Math.sqrt(dx ** 2 + dy ** 2)
}

puts d.max
