object Main extends App {
  val sc = new java.util.Scanner(System.in)
  var list: List[String] = List()
  while(sc.hasNext) {
    val ln = sc.nextLine
    list = ln :: list
    list = list.reverse
  }
  for(i <- 0 until list.length) {
    val line = list(i).split(" ").map(_.toInt)
    val y: Float = (line(0) * line(5) - line(2) * line(3))/(line(0) * line(4) - line(1) * line(3))
    val x: Float = (line(2) - line(1) * y) / line(0)
    val xf = "%.3f".format(x)
    val yf = "%.3f".format(y)
    println(xf + " " + yf)
  }
}