import java.util.Scanner

import scala.collection.mutable.ListBuffer
import scala.math.BigDecimal.RoundingMode

object Main {
  def main(args : Array[String]) = {
    val scanner = new Scanner(System.in)
    val inputs = ListBuffer.empty[Array[BigDecimal]]
    while(scanner.hasNextLine) {
      inputs += scanner.nextLine().split(" ").map(BigDecimal(_))
    }

    inputs.foreach{
      case Array(a,b,c,d,e,f) =>
        var wA = a / a
        var wB = b / a
        var wC = c / a
        var wD = d - wA * d
        var wE = e - wB * d
        var wF = f - wC * d

        wD = wD / wE
        wF = wF / wE
        wE = wE / wE

        wA = wA - wD * wB
        wC = wC - wF * wB
        wB = wB - wE * wB

        println(s"${wC.setScale(3, RoundingMode.HALF_UP)} ${wF.setScale(3, RoundingMode.HALF_UP)}")
    }
  }
}