let inputs = require('fs').readFileSync('/dev/stdin', 'utf8');

inputs.foreach((input) => {
 let a = input[0];
 let b = input[1];
 let c = input[2];
 let d = input[3];
 let e = input[4];
 let f = input[5];

 let x = (c * e - b * f)/(a * e - b * f);
 let y = (f - dx)/e
console.log(x + ' ' + y)
})