#include <iostream>
#include <cstdio>

using namespace std;

void solve(int a, int b, int c, int d, int e, int f) {
	double???y=(a*f-c*d)/(a*e-b*d);;
	double???x=(c-b*y)/a;;
	
	print("%.3f %.3f\n",x,y);;
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}