object Main extends App {
  var line = scala.io.StdIn.readLine
  val array = new Array[String](99999)
  var i = 0
  while(line != null) {
    array(i) = line
    i += 1
    line = scala.io.StdIn.readLine
  }
  for(j <- 0 to array.length) {
    val list = array(j).split(" ").map(_.toInt)
    val a = list(0)
    val b = list(1)
    val c = list(2)
    val d = list(3)
    val e = list(4)
    val f = list(5)
    val x = (c/(b-f)/e)/(a/(b-d)/e)
    val y = (c-a*x)/b
    println(x + " " + y)
  }
}