#include <iostream>
using namespace std;

int main(){
	double x, y;
	int a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f){
		double p = (double)e/(double)b;
		x = (p*(double)c-f)/(p*(double)a-(double)d);
		y = ((double)c-double(a)*x)/(double)b;

		printf("%.3f %.3f", x, y);
	}

	return 0;
}