#include<iostream>
#include<math.h>
#include<cstdio>
using namespace std;
int main(){
	while(1){
		int a,b,c,d,e,f;
		cin>>a>>b>>c>>d>>e>>f;
		if(cin.eof()) {break;}
		double d1,d2,d3;
		d1=a*e-b*d;
		d2=c*e-b*f;
		d3=a*f-c*d;
                double x=d2/d1,y=d3/d1;
		if(x<0&&y<0)
		    printf("-%.3f -%.3f\n",fabs(x),fabs(y));
                if(x<0&&y>=0)
		    printf("-%.3f %.3f\n",fabs(x),fabs(y));
		if (x>=0&&y<0)
		    printf("%.3f -%.3f\n",fabs(x),fabs(y));
		if (x>=0&&y>=0)
		    printf("%.3f %.3f\n",fabs(x),fabs(y));
	}
	return 0;	
}