#include <iostream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = double(c*e-f*b)/double(a*e-d*b);
		double y = double(c*d-f*a)/double(b*d-a*e);
		if(abs(x)<0.00001) x = 0.0;
		if(abs(y)<0.00001) y = 0.0;
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
}