#include <iostream>
using namespace std;

int main(){
    	int a, b, c, d, e, f;
	double x, y;
	while(cin>>a>>b>>c>>d>>e>>f){
		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 << x << y << endl;
	}
	return 0;
}