import scala.util.control.Breaks
object Main extends App {
  val bs = Breaks

  bs.breakable {
    for (line <- io.Source.stdin.getLines()) {
      if (line.isEmpty) bs.break()

      val Seq(a, b, c, d, e, f) = line.split(' ').map(_.toDouble).toList

      val det = a * e - b * d

      var x = "%.3f".format((c*e - b*f) / det)
      var y = "%.3f".format((a*f - c*d) / det)

      if (x == "-0.000") x = "0.000"
      if (y == "-0.000") y = "0.000"

      println("%s %s".format(x, y))
    }
  }
}
