import java.util.*
fun main(args: Array<String>) {

    val sc = Scanner(System.`in`)
    while (sc.hasNext()) {
        val list = Array(6, { sc.nextDouble() })
        var multi = list[3] / list[0]
        val y_multi = list[4] - (list[1] * multi)
        val kai_malti = list[5] - (list[2] * multi)
        var y: Double = kai_malti / y_multi
        var x: Double = (list[2] - (list[1] * y)) / list[0]
        println("%.3f".format(x) + " " + "%.3f".format(y))
    }
}
