import java.math.*

fun main(args: Array<String>) {
    val N = readInputLine().toInt()
    
    val endinges = Array(N, {Pair(0.0, 0.0)})
    
    for (i in 0 until N) {
        val (x, y) = readInputLine().split(" ").map { it.toDouble() }
        endinges[i] = Pair(x, y)
    }
    
    endinges.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 += endinges[(i + j) % N].first
            y += endinges[(i + j) % N].second

            ans = Math.max(ans, Math.sqrt(x * x + y * y))
        }
    }

    println(ans)
}

fun readInputLine(): String {
    return readLine()!!
}

