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:Double = (c*d-a*f)/(b*d-a*e)
	      val x:Double = (c-b*y)/a
	      printf("%.3f %.3f",x,y)
	    }
	    
    }
}