#include<cstdio>
using namespace std;

int main(){
	
	int a,b,c,d,e,f;
	
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != -1){
		
		double del = a*e - b*d;
		printf("%.3lf %.3lf\n",(e*c-b*f)/del,(-d*c+a*f)/del);
	}
	
	return 0;
}