#include <bits/stdc++.h>
using namespace std;
int main(){
	long long a,b,c,d,e,f;
	double x,y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x=(double)(c*(a*e-b*d)-b*(a*f-c*d))/(double)(a*(a*e-b*d));
		y=(double)(a*f-c*d)/(double)(a*e-b*d);
		if(x==-1*0)x=0;
		if(y==-1*0)y=0;
		printf("%.6lf %.6lf\n",x,y);
	}
	return 0;
}
