var input = [];
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on('data', function(chunk){
   input = chunk.toString("utf8").trim().split("\n");
});
process.stdin.on('end', function(){
    for (var i = 0; i < input.length; i++) {
    var data = input[i].split(" ").map(Number);
    var a = data[0],
        b = data[1],
        c = data[2],
        d = data[3],
        e = data[4],
        f = data[5];
        
    var x = ((c * e - b * f) / (a * e - b * d)).toFixed(3);
    var y = ((f * a - c * d) / (a * e - d * b)).toFixed(3);
    console.log(x + " " + y);
    }
    
});