#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <iomanip>
#include <queue>
#include <cmath>
using namespace std;


int GetDigit(int n){
	int i = 0;

	while(n > 0){
		n /= 10;
		i++;
	}

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

	cout.flags(ios::fixed);
	cout.precision(3);
	
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (c*e-b*f)/(a*e-b*d);
		y = (c*d-a*f)/(b*d-a*e);

		if(x == -0.0) x = abs(x);
		if(y == -0.0) y = abs(y);
		cout << x << ' ' << y << endl;
	}

	return 0;
}