require 'mathn'
n = gets.to_i
xy = n.times.map{gets.split.map(&:to_i)}
d = []
1.upto(n) do |i|
  xy.combination(i).each do |dxy|
    x = y = 0
    dxy.each do |dx, dy|
      x += dx
      y += dy
    end
    d.push Math.sqrt(x*x+y*y)
  end
end
p d.max
