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)
da = dist
db = dist

xsuma = xsum
ysuma = ysum
(0..n-1).each do |i|
  d = distance(xsuma - xyn[i][0], ysuma - xyn[i][1])
  if da < d
    xsuma -= xyn[i][0]
    ysuma -= xyn[i][1]
    da = d
  end
end

xsumb = xsum
ysumb = ysum
(0..n-1).each do |i|
  i = n - 1 - i
  d = distance(xsumb - xyn[i][0], ysumb - xyn[i][1])
  if db < d
    xsumb -= xyn[i][0]
    ysumb -= xyn[i][1]
    db = d
  end
end

puts [da, db].max