#include <iostream>
#include <iomanip>

int main(){
	double a, b, c, d, e, f;
	while(std::cin >> a){
		std::cin >> b >> c >> d >> e >> f;
		std::cout << std::fixed << std::setprecision(3)
			<< (c * e - b * f) / (a * e - b * d) << ' '
			<< (a * f - c * d) / (a * e - b * d) << std::endl;
	}
	return 0;
}