#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double t = 1 / (a*e - b*d);
		double x = (e*c - b*f);
		x *= (x == 0.0) ? 0.0 : t;
		double y = (a*f - c*d) ;
		y *= (y == 0.0) ? 0.0 : t;
		printf("%.3f %.3f\n", round(x*1000)/1000.0, round(y*1000)/1000.0);
	}
	return 0;
}

