var Main = function (input){
    input = input.split('\n');
    input.forEach(function (val, index, arr){
        var ns = val.split(' ');
        var x = (ns[2] * ns[4] - ns[1] * ns[5]) / (ns[0] * ns[4] - ns[1] * ns[3]), 
            y = (ns[5] * ns[0] - ns[2] * ns[3]) / (ns[0] * ns[4] - ns[3] * ns[1]);
        console.log(x.toFixed(3), y.toFixed(3));
    });
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));