fun main(args: Array<String>) {
    fun toPair(L: List<Double>) = Pair(L[0], L[1])
    val N = nextInt()
    val E = Array<Pair<Double, Double>>(N, { toPair(listOfDouble()) })
    E.sortBy { Math.atan2(it.first, it.second) }
    var ans = 0.0
    for (i in 0 until N) {
        var x = 0.0
        var y = 0.0
        for (j in 0 until N) {
            x += E[(i + j) % N].first
            y += E[(i + j) % N].second
            ans = Math.max(ans, Math.sqrt(x * x + y * y))
        }
    }
    println(ans)
}
fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfDouble() = listOfString().map { java.lang.Double.parseDouble(it) }