/**
  * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004
  * Simultaneous Equation
  */
object Main {
  def main(args: Array[String]): Unit = {
    Iterator.continually(io.StdIn.readLine()).takeWhile(_ != null).map(_.split(" +").map(BigDecimal(_)))
      .map { case Array(a, b, c, d, e, f) => solve(a, b, c, d, e, f) }
      .foreach { case (x, y) =>
        println(s"${x.setScale(3, BigDecimal.RoundingMode.HALF_UP)} ${y.setScale(3, BigDecimal.RoundingMode.HALF_UP)}")
      }
  }

  def solve(a: BigDecimal, b: BigDecimal, c: BigDecimal, d: BigDecimal, e: BigDecimal, f: BigDecimal): (BigDecimal, BigDecimal) = {
    val x = (e * c - b * f) / (a * e - b * d)
    val y = (-d * c + a * f) / (a * e - b * d)
    (x, y)
  }

}