#include<stdio.h>
int main(){
	double a,b,c,d,e,f,x,y;
	while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)==6){
        double y=(double)(c*d-a*f)/(double)(b*d-a*e);
        if(a!=0)
			printf("%.3f %.3f\n",(c-b*y)/a,y);
        else
			printf("%.3f %.3f\n",(f-e*y)/d,y);}
	return 0;}
