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

int main(void){

	while (true){
		float a, b, c, d, e, f;
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof()) break;

		float x, y;
		x = (c*e-b*f)/(a*e-b*d);
		y = -(c*d-a*f)/(a*e-b*d);
		cout<<fixed<<setprecision(3);
		cout<<x<<" "<<y<<endl;
	}
	return 0;
} 