import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    while (sc.hasNext()) {
        val a = Array(6, { sc.nextDouble() })
        val div: Double = a[0]*a[4]-a[1]*a[3]
        var x: Double = (a[4]*a[2]-a[1]*a[5])/div
        var y: Double = (a[0]*a[5]-a[2]*a[3])/div
        if (x == 0.0) x*=x
        if (y == 0.0) y*=y

        println(String.format("%.3f %.3f", x, y))
    }
}
