#include<iostream>
#include<iomanip>
using namespace std;

int main(){
	double a,b,c,d,e,f,x,y;
	cout<<setprecision(3);
	cout<<fixed;
	while(cin>>a>>b>>c>>d>>e>>f){
		x=1.0/(a*e-b*d)*(e*c-b*f);
		y=1.0/(a*e-b*d)*(a*f-d*c);
		if(-0.0005<=x && x<=0)x=0;
		if(-0.0005<=y && y<=0)y=0;
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}