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

int main(void)
{
	int a,b,c,d,e,f;
	float 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);

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

	return 0;
}
	