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

int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double tmpx = (c*e-b*f)/(a*e-b*d);
		double tmpy = (c*d-a*f)/(b*d-a*e);
		double fx = 1, fy = 1;
		if(tmpx<0){
			fx = -1;
		}
		if(tmpy<0){
			fy = -1;
		}
		double x = round(tmpx*fx*1000)/(fx*1000);
		double y = round(tmpy*fy*1000)/(fy*1000);
		printf("%.3f %.3f", x, y);
	}
}