//config = {stdin: 'tmp', newline: '\r\n'}; // win
config = {stdin: '/dev/stdin', newline: '\n'}; // linux

require('fs').readFileSync(config.stdin, 'ascii')
	.trim()
	.split(config.newline)
	.forEach(function (line) {
		var ary = line.split(' ').map(Number);
		var a = ary[0], b = ary[1], c = ary[2],
			d = ary[3], e = ary[4], f = ary[5];
		var det = a * e - b * d;
		var Ainv_c = (e * c - b * f) / det;
		var Ainv_f = (-d * c + a * f) / det;
		console.log('%s %s', format(Ainv_c), format(Ainv_f));
	});

function format(num) {
	var s = num.toFixed(4);
	var point = s.indexOf('.');
	if (point === -1) return s + '.000';
	return (s + '000').slice(0, point + 4);
}