#include "stdio.h"
#include "math.h"

#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;

int main()
{
	double a, b, c, d, e, f;
	while (cin>>a>>b>>c>>d>>e>>f) {
		double x, y;
		
		x = 1/(a*e-b*d)*(c*e-b*f);
		y = 1/(a*e-b*d)*(f*a-c*d);
		
		if (x == -0.0) x = 0.0;
		if (y == -0.0) y = 0.0;
		
		//cout << x << " " << y << endl;
		printf("%.3f %.3f\n", x, y);
	}
}