#include <cstdio>
using namespace std;
double eps=1e-9;
int main(){
	double a,b,c,d,e,f;
	while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF) printf("%.3f %.3f\n",(c*e-b*f)/(a*e-b*d)+eps,(a*f-c*d)/(a*e-b*d)+eps);
	return 0;
}