#include<stdio.h>


double shishagonyu(double x){
	if(x > 0){
		x = (int)(x*1000 + 0.5);
	}else if(x < 0){
		x = (int)(x*1000 - 0.5);
	}
	return x/1000;
}


int main(){
	double a, b, c, d, e, f;

	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		double r = b*d - a*e;
		double x = (b*f - c*e)/r;
		double y = (c*d - a*f)/r;
		printf("%0.3f %0.3f\n", x, y);
	}

	return 0;
}