#include<iostream>
#include<cstdio>
using namespace std;
double Emat(double a,double b,double c,double d);

int main(){
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		
		int x=Emat(c,b,f,e)/Emat(a,b,d,e)*1000;
		int y=Emat(a,c,d,f)/Emat(a,b,d,e)*1000;
		double xd=x/1000.0;
		double yd=y/1000.0;

		printf("%.3f %.3f\n",xd,yd);
		
	}
	return 0;
}

double Emat(double a,double b,double c,double d){
	return a*d-b*c;
}