
object Main {
  def main(args: Array[String]): Unit = {
    val lines = Iterator.continually(scala.io.StdIn.readLine).takeWhile(_ != null).toList.foreach { line =>
      val in = line.split(" ").map(_.toDouble)
      val (x, y) = solve(in(0), in(1), in(2), in(3), in(4), in(5))
      println(f"${round(x)}%.4f ${round(y)}%.4f");
    }
  }

  def solve(a: Double, b: Double, c: Double, d: Double, e: Double, f: Double): (Double, Double) = {
    val det = a * e - b * d
    val inva = e
    val invb = -b
    val invc = -d
    val invd = a
    val x = (inva * c + invb * f) / det
    val y = (invc * c + invd * f) / det

    (x, y)
  }
  
  def round(x: Double): Double = {
    scala.math.round(x * 1000) / 1000.0;
  }
}