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

int main(){
	double a,b,c,d,e,f,delta,kai,kait;
	while(1){
	cin >> a >> b >> e >> c >> d >> f;
	delta=a*d-b*c;
	kai=(d*e-b*f)/delta;
	kait=(a*f-e*c)/delta;
	printf("%.3f %.3f\n",kai,kait);
	}

	return 0;
}