#include <bits/stdc++.h>
using namespace std;

int main() {
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
    	double x,y;
    	x=(b*f-e*c)/(b*d-a*e);
    	y=(a*f-c*d)/(a*e-b*d);
    	if(x==0)x=0;
    	if(y==0)y=0;
    	printf("%.3lf %.3lf\n",x,y);
	}
	// your code goes here
	return 0;
}