#include <iostream>
#include <cstdio>
using namespace std;

int round(double x){
	if(x>=0){
		return x+0.5;
	}else{
		return x-0.5;
	}
}


int main(){

	int a,b,c,d,e,f;
	double x,y;

	while(cin>>a>>b>>c>>d>>e>>f){
		x = (c*e - b*f)/(double)(a*e - b*d);
		y = (c*d - a*f)/(double)(b*d - a*e);

		int o,p;
		o = round(x*1000);
		p = round(y*1000);


		printf("%.3lf %.3lf\n",(double)o/1000,(double)p/1000);
	}
	return 0;
}