'use strict';

function out(result) {
  console.log(result[0] + " " + result[1]);
  return result;
}

function main(chunk) {
  var temp = chunk[0].split(' ').map(Number);
  var a = temp[0];
  var b = temp[1];
  var c = temp[2];
  var d = temp[3];
  var e = temp[4];
  var f = temp[5];

  var y = ((d * c - a * f + a * e) / b * d).toFixed(3);
  var x = ((c - b * y) / a).toFixed(3);
  return [x, y];
}

out(main(require('fs').readFileSync('/dev/stdin', 'utf8').split('/n')));