object Main {
	def main(args:Array[String]) = {
	    val sc = new java.util.Scanner(System.in)
	    while(sc.hasNext){
	      val a,b,c,d,e,f = sc.nextInt
	      val y = (c*d-a*f)/(b*d-a*e)
	      val x = (c-b*y)/a
	      println(BigDecimal(x).setScale(3, BigDecimal.RoundingMode.HALF_UP)+" "+BigDecimal(y).setScale(3, BigDecimal.RoundingMode.HALF_UP))
	    }

    }
}