object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    while (sc.hasNext){
      val a, b, c, d, e, f = sc.nextInt
      val delta : Double = a * e - b * d
      val tx = BigDecimal((e * c - b * f) / delta)
      val ty = BigDecimal((a * f - d * c) / delta)
      val x = tx.setScale(3, scala.math.BigDecimal.RoundingMode.HALF_UP)
      val y = ty.setScale(3, scala.math.BigDecimal.RoundingMode.HALF_UP)
      println(x + " " + y)
    //println(f"$x%.3f $y%.3f")
    }
  }
}