#include<iostream>
#include<algorithm>
#include<complex>
#include<iomanip>
using namespace std;
int main(){
	double a,b,c,d,e,f;
	int t=90000;
	for(int i=t;i;i--){
		for(int j=i;j;j--){
			if(i+j==2)a=0.0;
		}
	}
	while(cin>>a){cin>>b>>c>>d>>e>>f;
		cout<<fixed<<setprecision(9)<<abs((c*e-b*f)/(a*e-b*d))<<" ";
		cout<<fixed<<setprecision(9)<<abs((c*d-a*f)/(b*d-a*e))<<endl;
	}
	return 0;
}