import scala.io.StdIn.readLine
import scala.annotation.tailrec

object Main {
    def main(args: Array[String]): Unit = { 
        digit(readLine().split(" ").map(_.toDouble))
    }   

    @tailrec
    def digit(n: Seq[Double]): Unit = {
       val d: Double = n(1) * n(3) - n(0) * n(4)
       val x: Double = zero((n(1) * n(5) - n(4) * n(2)) / d)
       val y: Double = zero((n(2) * n(3) - n(0) * n(5)) / d)
       println(f"$x%.3f $y%.3f")
       val next: String = readLine()
       if(next == null) Unit else digit(next.split(" ").map(_.toDouble))
    }

    def zero(n: Double): Double = if(n == -0) 0 else n
}