import scala.io.StdIn._
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 x: Double = (n(1)*n(5) - n(4)*n(2)) / (n(1)*n(3) - n(0)*n(4))
       val y: Double = (n(0)*n(5) - n(2)*n(3)) / (n(0)*n(4) - n(1)*n(3))
       println(f"$x%.3f" + " " + f"$y%.3f")
       val next: String = readLine()
       if(next == null) Unit else digit(next.split(" ").map(_.toDouble))
    }
}