#include <iostream>
#include <cstdio>

using namespace std;

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

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

		printf("%.3f %.3f\n",x, y);
	}
	return 0;
}