def distance(x, y)
  return ((x ** 2) + (y ** 2)) ** 0.5
end

n = gets.chomp.to_i
xyn = []
xsum = 0
ysum = 0
n.times do
  x, y = gets.chomp.split(" ").map(&:to_i)
  xsum += x
  ysum += y
  xyn << [x, y]
end

dist = distance(xsum, ysum)
# puts dist

(0..n-1).each do |i|
  d = distance(xsum - xyn[i][0], ysum - xyn[i][1])
  # puts "#{i}:#{d} > #{dist} ?..."
  if dist < d
    xsum -= xyn[i][0]
    ysum -= xyn[i][1]
    dist = d
  end
end

puts dist