#include<iostream>
#include<string>
#include<stdio.h>
#include<cctype>
#include<algorithm>
#include<climits>
#include<cmath>
#include<map>
#include<vector>
#define INF INT_MAX
using namespace std;

double a, b, c, d, e, f;
double x, y;
double A;

int main(){
	while (cin >> a >> b >> c >> d >> e >> f){
		A = a*e - b*d;
		x = c*e - b*f;
		x /= A;
		y = a*f - c*d;
		y /= A;
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		printf("%.3lf %.3lf\n", x, y);
	}

	return 0;
}
