process.stdin.resume();
process.stdin.setEncoding('utf8');
// ???????????????????¨??????§
// Let's ?????£??¬????????????
process.stdin.on('data', function (chunk) {
    var aaa = chunk.toString();
    var line = aaa.split("\n");
    for(var i in line){
        var l = line[i].split(" ");
        for(var i in l){
            l[i] = new Number (l[i]);
        }
        var x = (l[2] * l[4] - l[1] * l[5]) / (l[0] * l[4] - l[1] * l[3]);
        var y = (l[0] * l[5] - l[2] * l[3]) / (l[0] * l[4] - l[1] * l[3]);
        x  = Math.round(x * 1000) / 1000;
        y  = Math.round(y * 1000) / 1000;
        if(x === -0){
            x = 0;
        }
        if(y === -0){
            y =0;
        }

        console.log(x.toPrecision(4), y.toPrecision(4));
    }
});