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

int main(){
	double a,b,c,d,e,f,m,n,y,x;
	
	while(cin>>a>>b>>c>>d>>e>>f){
	
	m = a;
	n = d;
	
	a *= n;
	b *= n;
	c *= n;
	
	d *= m;
	e *= m;
	f *= m;
	
	y = (double)((c-f)/(b-e));
	
	x = (double)((c-b*y)/a);
	
	if(x == 0)
		x = 0;
	if(y == 0)
		y =0;
	
	printf("%.3f %.3f\n",x,y);
	}
}