#include<iostream>
#include<cstdio>

using namespace std;

double round(double d){
	int k = (int)(d*10000)%10;
	int k2 = (int)(d*100000)%10;
	int k3 = (int)(d*1000000)%10;
	int k4 = (int)(d*10000000)%10;
	return (k>=5 || k == 4 && k2 >= 8 && k3 >= 8)? d-((double)k/10000)+0.001: d- ((double)k/10000);
}

int main(){
	int a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f){
		double del = 1.0/(a*e - d*b);
		printf("%0.3f %0.3f\n", round(del*(e*c-b*f)), round(del*(a*f-d*c)));
	}
}