object Main {
    def main(args: Array[String]) = {
        val in = io.Source.stdin.getLines.map(_.split(" ").map(_.toDouble))
        in.foreach(x => println("%.3f %.3f".format((x(2)*x(4)-x(1)*x(5))/(x(0)*x(4)-x(1)*x(3))+0, (x(0)*x(5)-x(2)*x(3))/(x(0)*x(4)-x(1)*x(3))+0)))
    }
}