#include <iostream>
#include <iomanip>
#include <vector>
using namespace std;

int main(){
	vector<double*> data;
	while(!cin.eof()){
		int a,b,c,d,e,f;
		cin >> a >> b >> c >> d >> e >> f;
		double x[2];
		x[0] = (double)(c*e - f*b)/(a*e - d*b);
		x[1] = (double)(a*f - d*c)/(a*e - d*b);
		if(x[0] == 0)x[0] = 0.;
		if(x[1] == 0)x[1] = 0.;
		data.push_back(x);
	}
	vector<double*>::iterator it = data.begin();
	for(;it != data.end();++it)
		printf("%.3f %.3f",(*it)[0],(*it)[1]);
	return 0;
}