#include<iostream>
#include<algorithm>
#include<cstdio>
//f = 108.233533
//puts sprintf( "%.3f", f )
using namespace std;
int main(){
	double a,b,c,d,e,f;
	//scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
	while(cin>>a>>b>>c>>d>>e>>f){
	double x,y;
	y=/*(double)*/ (c*d-a*f)/(b*d-a*e);
	x=/*(double)*/ (c-b*y)/a;
	printf("%.3f %.3f\n",x,y);
	}
	//printf("%.5f",f);
	return 0;
}