program engines
  implicit none
  integer :: n, i, j
  real(8) :: x(100) = 0.d0, y(100) = 0.d0, a, b, ans = 0.d0
  character(64) :: tmp
  read(*,*) n
  do i = 1, n
    read(*,*) x(i), y(i)
  end do
  do i = 1, n
    a = x(i)
    b = y(i)
    do j = 1, n
      if (j == i) cycle
      if (a*x(j)+b*y(j) >= -0.5d0*(x(j)*x(j)+y(j)*y(j))) then
        a = a+x(j)
        b = b+y(j)
      end if
    end do
    ans = max(ans,sqrt(a*a+b*b))
  end do
  write(tmp,'(f32.16)') ans
  write(*,'(a)') trim(adjustl(tmp))
end program engines