import scala.math.BigDecimal.RoundingMode._
object Main extends App {

  var line = io.StdIn.readLine
  while(line!=null || !line.isEmpty){
    val n =  line.split(' ').map {_.toInt}
    val a = n(0)
    val b = n(1)
    val c = n(2)
    val d = n(3)
    val e = n(4)
    val f = n(5)

    val x :BigDecimal = BigDecimal((b*f-e*c) / (b*d-a*e)).setScale(3, HALF_UP)
    val y :BigDecimal = ((c - a * x) / b).setScale(3, HALF_UP)

    println(s"$x $y")
    line = io.StdIn.readLine
  }
}