import java.util.Scanner

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

  val sc = new Scanner(System.in)
  while(sc.hasNext){
    val line = sc.nextLine()
    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 :BigDecimal = BigDecimal((b*f-e*c) / (b*d-a*e)).setScale(3, HALF_UP)
    var y :BigDecimal = ((c - a * x) / b).setScale(3, HALF_UP)

    if(x==0)x=0;
    if(y==0)y=0;
    println(f"$x%.3f $y%.3f")
  }
}