import scala.math.BigDecimal.RoundingMode._
object Main extends App {
  for(line <- io.Source.stdin.getLines()){
    val n =  line.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, HALF_UP)
    val y1 :BigDecimal = ((c - a * x) / b).setScale(3, HALF_UP)
    val y2 :BigDecimal = ((f - d * x) / e).setScale(3, HALF_UP)
  
    println(f"$x%.3f $y1%.3f")
  }
}