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

int main(void)
{
	double a,b,c,d,e,f;
	double ans[2];

	cin >> a >> b >> c >> d >> e >> f;

	ans[1] = (c*d-a*f)/(b*d-a*e);
	ans[0] = (c*d-b*d*ans[1])/(a*d);

	if(ans[1] < 0 && ans[1] > -0.0005)
		ans[1] *= -1;
	if(ans[0] < 0 && ans[0] > -0.0005)
		ans[0] *= -1;

	printf("%.3lf %.3lf\n", ans[0],ans[1]);

	return 0;
}
	