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

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

return 0;
}