process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk){


 var array = (chunk.trim()).split("\n")



for (var i = 0; i < array.length; i++) {
  var p = array[i].split(" ");
  var x = (( p[2] * p[4] ) - ( p[1] * p[5] )) / (( p[0] * p[4] ) - ( p[1] * p[3] ));
  ver y = p[2] - ( p[0] * x );
  ver xf = x.toFixed(3) ;
  ver yf = y.toFixed(3);
  console.log(xf + " " + yf);

}



  })