import java.util.Scanner
object Equnation{
    def main(args:Array[String]):Unit = {
        val scan = new Scanner(System.in)
        var res = List[Double]()
        var count = 0
        while(scan.hasNext()){
            val take = for(i <- 1 to 6) yield scan.nextDouble()
            val d = det(take(0),take(1),take(3),take(4))
            val x = det(take(2),take(1),take(5),take(4))/d
            val y = det(take(0),take(2),take(3),take(5))/d
            res :+= x
            res :+= y
            count += 1
        }
        for(i <- range(0,count,2)){
            println(s"${res(i)} $res{i+1}")
        }
    }

    def det(array:Double*):Double = {
        array(0)*array(3)-array(1)*array(2)
    }
}