function main(input) {
  input.split('\n').forEach(line => {
    const [a, b, c, d, e, f] = line.split(' ').map((n) => parseInt(n))
    const detA = a * e - b * d
    const detA1 = c * e - b * f
    const detA2 = a * f - c * d

    console.log(`${(detA1 / detA).toFixed(3)} ${(detA2 / detA).toFixed(3)}`)
  })
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
