#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
#define EPS 1e-9
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.SE", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		stringstream ss (str );
		int a, b, c, d, e, f;
		ss >> a >> b >> c >> d >> e >> f;
		double x = 0.0, y = 0.0;
		x = (double)(c*e - b*f)/(double)(a*e - b*d);
		y = (double)(c*d - a*f)/(double)(b*d - a*e);

		if (fabs(x) < 1.0e-3){
			x = 0.0;
		} // end if
		if (fabs(y) < 1.0e-3){
			y = 0.0;
		} // end if

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