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

int main(){
	float a, b, c, d, e, f;
	float x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
	x = (c*e - b*f) / (a*e - b*d);
	y = (a*f - c*d) / (a*e - b*d);
	x = floor(100 * (x + 0.005)) / 100;
	y = floor(100 * (y + 0.005)) / 100;
	cout << setprecision(3) << fixed << x << " " << y <<endl;
	}
	return 0;
}