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

int main()
{
	double x, y;
	double a, b, c, d, e, f;
	
	while(scanf("%lf", &a) != EOF)
	{
		cin >> b >> c >> d >> e >> f;
		
	x = (c * e - b * f) / (a * e - b * d);
	y = (a * f - c * d) / (a * e - b * d);
	
	cout << setprecision(3);
	cout << setiosflags(ios::fixed);

	cout << x << " " << y << endl;
	}
	return 0;
}