#include <iostream>
#include <iomanip>
#include <vector>

int main(int argc, char const *argv[]){
	
	double a,b,c,d,e,f;
	std::vector<double> solution_x;
	std::vector<double> solution_y;

	while(std::cin >> a >> b >> c >> d >> e >> f){
		double x = (c*e-b*f)/(a*e-b*d);
		double y = (a*f-c*d)/(a*e-b*d);
		solution_x.push_back(x);
		solution_y.push_back(y);
	}

	for (int i = 0; i < solution_x.size(); ++i){
		std::cout << std::fixed;
		std::cout << std::setprecision(3);
		std::cout << solution_x[i] << " " << solution_y[i] << std::endl;
	}

	return 0;
}

