#include <iostream>
#include <cstdio>

using namespace std;

double round(double x)
{
	return (int)(x + 0.5 - (x < 0));
}

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