#include <iostream>
#include <iomanip>

int main(){
	
	double a, b, c, d, e, f;
	// input
	while(std::cin >> a >> b >> c >> d >> e >> f){
		
		/*	solve the equation
		*	y = (f - d*x) / e
		*	x = (c*e - b*f) / (a*e - b*d)
		*/
		double x = (c*e - b*f) / (a*e - b*d);
		double y = (a*f - c*d) / (a*e - b*d);
		
		// need this process for submitting
		if(x == -0)	x = 0.0;
		if(y == -0)	y = 0.0;
		// output
		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}
	
	return 0;
}