#include<iostream>
#include<iomanip>
#include<stdio.h>
#include<cmath>

using namespace std;

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

	while(true){
		cin >> a >> b >> c >> d >> e >> f;

		double tempb = b;

		a*=e;b*=e;c*=e;
		d*=tempb;e*=tempb;f*=tempb;
		a-=d;b-=e;c-=f;

		x = c/a;
		y = (f-(d*x))/e;

		if(x == -0)
			x = 0;
		if(y == -0)
			y = 0;
		x = floor((x+0.0005)*1000)/1000;
		y = floor((y+0.0005)*1000)/1000;
		printf("%0.3lf %0.3lf\n",x,y);
	}

	return 0;
}