import scala.io.Source.stdin

object Main extends App {
  def det(a00:Double,a01:Double,a10:Double,a11:Double) = a00*a11-a01*a10

  for( i <- stdin.getLines ) {
    val a = i.split(" ").map(_.toDouble)
    val detA = det(a(0),a(1),a(3),a(4))
    printf("%.3f %.3f\n",det(a(2),a(1),a(5),a(4))/detA+0.0,det(a(0),a(2),a(3),a(5))/detA+0.\
0)
  }
}