object Main extends App {

  def safeDivide(l: Double, r: Double) = if (l == 0.0) 0.0 else l / r
  def format(x: Double) = {
    val s = (x * 1000).round formatted "%04d"
    s.dropRight(3) + "." + s.takeRight(3)
  }

  val sc = new java.util.Scanner(Console.in)

  while (sc.hasNextLine()) {
    val line = sc.nextLine()
    val Array(a, b, c, d, e, f) = line.split(' ').map(_.toDouble)
    val x = safeDivide(c*e - b*f, a*e - b*d)
    val y = safeDivide(c - a*x, b)

    println(format(x) + " " + format(y))
  }
}

