#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main(){
	double a, b, c, d, p, q;
	double x, y;
	while(cin >> a >> b >> p >> c >> d >> q){
		x = (d*p - b*q)/(a*d - b*c);
		y = (c*(-p) + a*q)/(a*d - b*c); //条件より?≠0
		x = floor(100*(x + 0.005)) / 100; 
		y = floor(100*(y + 0.005)) / 100; //四捨五入
		cout << setprecision(3) << fixed << x << " " << y << endl;
	}
	return(0);
}