#include <iostream>
using namespace std;
int main(){
	double a;
	double b;
	double c;
	double d;
	double e;
	double f;
	while(cin >> a
		>> b
		>> c
		>> d
		>> e
		>> f){
			double det = 1.0/(a*e-b*d);
			double x = det*(e*c-b*f);
			double y = det*(-d*c+a*f);
			if(x==0)x=0;
			if(y==0)y=0;
			printf("%.3f %.3f\n",x,y);
		}
	return 0;
	}