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

int main(){
    	int a, b, c, d, e, f;
	double x, y;
	while(1){
	if (!(cin>>a>>b>>c>>d>>e>>f))break;
		x= round( (double)(1000.0/(a*e-b*d))*(e*c-b*f) ) / 1000.0;
		y= round( (double)(1000.0/(a*e-b*d))*(-d*c+a*f)) / 1000.0;
		cout << fixed << setprecision(3) << (double)x << " " << (double)y << endl;
	}
	return 0;
}