object Main extends App {
  val n =  io.StdIn.readLine().split(' ').map {_.toInt}
  val a :Double = n(0)
  val b :Double = n(1)
  val c :Double = n(2)
  val d :Double = n(3)
  val e :Double = n(4)
  val f :Double = n(5)

  val x :BigDecimal = BigDecimal((b*f-e*c) / (b*d-a*e)).setScale(3, scala.math.BigDecimal.RoundingMode.HALF_UP)
  val y1 :BigDecimal = ((c - a * x) / b).setScale(3, scala.math.BigDecimal.RoundingMode.HALF_UP)
  val y2 :BigDecimal = ((f - d * x) / e).setScale(3, scala.math.BigDecimal.RoundingMode.HALF_UP)

  println(f"$x%.3f $y1%.3f ")
}