#define _USE_MATH_DEFINES
#include <iostream> 
#include <iomanip>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	double a, b, c, d, e, f, x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (c*e - f*b) / (a*e - d*b);
		y = (c*d - f*a) / (b*d - e*a);
		if (x==0){ x=0; }
		if (y==0){ y=0; } 
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x << " " << y << endl;
	}
	return 0;
}
