
object Main extends App {

 for(line <- io.Source.stdin.getLines){
    val n =  line.split(" ").map {_.toDouble}
    val a = n(0)
    val b = n(1)
    val c = n(2)
    val d = n(3)
    val e = n(4)
    val f = n(5)

    var x :Double = (b*f-e*c) / (b*d-a*e)
    var y :Double = ((c - a * x) / b)
    if(x==0)x=0;
    if(y==0)y=0;
    println(f"$x%.3f $y%.3f")
  }
}