#include <iostream>
#include <cstdio>
#include <cstdlib>

using namespace std;

int main(){

	//FILE *fp;
	//if((fp=fopen("output.txt","w"))==NULL){
	//	return -1;
	//}

	int a,b,c,d,e,f;
	while(1){
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()){
			break;
		}
		double y = (double)(a*f-c*d)/(a*e-b*d);
		double x = (double)(c-b*y)/a;
		fprintf(stdout,"%.3f %.3f\n",x,y);
	}
//	fclose(fp);

	return 0;
}