object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    var flag = false
    while (sc.hasNext){
      flag = false
      val a, b, c, d, e, f = sc.nextInt
      val delta = a * e - b * d
      var x = (e * c - b * f) / delta
      var y = (a * f - d * c) / delta
      
      if (Math.abs((e * c - b * f) / delta)< 1e-3){
        x = 0
        flag = true
      }else{
        flag = true
      }
      if (Math.abs((a * f - d * c) / delta) < 1e-3){
        y = 0
        flag = true
      }else{
        flag = true
      }
    println(f"$x%.3f $y%.3f")
    }
  }
}