#include <iostream>
#include <algorithm>
#include <iomanip>
#include <cmath>
using namespace std;


int main() {
	float a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		float e2 =e*(a/d);
		float f2 =f*(a/d);
		d=a;
		float y=(c-f2)/(b-e2);
		float x=(c-b*y)/a;
		x*=1000;
		y*=1000;
		x=int(x+.5-(x<0));
		y=int(y+.5-(y<0));
		x*=(1/1000);y*=(1/1000);
		cout <<fixed;
		cout << setprecision(3) << x << " " << y << endl;

	}
	return 0;
}