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

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	double a,b,c,d,e,f;
	double x,y;
	while(cin >> a >> b >> c >> d >> e >> f){

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

		cout << x << ' ' << y << endl;
	}
	return 0;
}