#include<stdio.h>
#include <stdlib.h>
#include<math.h>

int main(){
	char buf[18];
	double a,b,c,d,e,f,x,y;
	while(fgets(buf,sizeof(buf),stdin)!=NULL){
		sscanf_s(buf,"%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
		x=(b*f-c*e)/(b*d-a*e);
		y=-1.0*(x*a-c)/b;
		printf("%.3lf %.3lf\n",x==0.0 ? fabs(x) : x, y==0.0 ? fabs(y) : y);
	}

    return 0;
}