#include <iostream>
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=(double)(1.0/(a*e-b*d))*(e*c-b*f);
		y=(double)(1.0/(a*e-b*d))*(-d*c+a*f);
		cout << (double)x << " " << (double)y << endl;
	}
	return 0;
}