#include<iostream>
#include<stdio.h>
using namespace std;


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

	x *= 1000;
	y *= 1000;
	x = int(x);
	y= int(y);
	x = x / 1000;
	y = y / 1000;
 	
 	printf("%.3lf %.3lf\n",x,y);
	}
 return 0;
}