#include<iostream>
#include<math.h>
using namespace std;

int main(){

	double a,b,c,d,e,f;

	double x,y;

	while(cin>>a){
		cin>>b;
		cin>>c;
		cin>>d;
		cin>>e;
		cin>>f;

		x = (e * c + (-b)*f)/(a*e-b*d);
		y = (-d * c + a * f)/(a*e-b*d);

		if(fabs(x)<1e-3 && fabs(y)<1e-3){
			printf("%.3f %.3f\n",fabs(x),fabs(y));
		}
		else if(fabs(x)<1e-3){
			printf("%.3f %.3f\n",fabs(x),y);
		}
		else if(fabs(y)<1e-3){
			printf("%.3f %.3f\n",x,fabs(y));
		}
		else{
			printf("%.3f %.3f\n",x,y);
		}

	}

	return 0;
}