#include <iostream>
#include <iomanip>

int main(int argc, char **argv){
	double a = 0;
	double b = 0;
	double c = 0;
	double d = 0;
	double e = 0;
	double f = 0;

	while(std::cin >> a >> b >> c >> d >> e >> f){
		double det = a * e - b * d;
		double x = (c * e - b * f) / det;
		double y = (a * f - c * d) / det;

		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}
	return 0;
}