#include<iostream>
#include<cstdio>
using namespace std;

int main(){
	int a,b,c,d,e,f;
	double x,y;
	
	while(cin >>a>>b>>c>>d>>e>>f){
		x=1.000*(c*e-b*f)/(a*e-b*d);
		y=1.000*(d*c-a*f)/(b*d-a*e);
		
		if(x==-0.000) x=0.000;
		printf("%.3f %.3f\n",x,y);
	}
	
	return 0;
}