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 Array(a,b,e,c,d,f) = i.split(" ").map(_.toDouble)
    val detA = det(a,b,c,d)
    printf("%.3f %.3f\n",det(e,b,f,d)/detA,det(a,e,c,f)/detA)
  }
}