var input = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
    input += chunk;
});
process.stdin.on('end', function() {
    main(input)
});

function main(input){
    var args = input.trim().split('\n');

    args.forEach(function(data){
        data = data.split(' ').map(Number);
        solve(data);
    })
}

function solve(numbers){
    var a = numbers[0], b = numbers[1], p = numbers[2];
    var c = numbers[3], d = numbers[4], q = numbers[5];

    var z = a * d - b * c;

    var x = (d * p - b * q) / z;
    var y = (a * q - c * p) / z;

    console.log(x.toFixed(3) + ' ' + y.toFixed(3));
}