#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
double ff(double);
int main(){
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		d = d*b/e;
		f = f*b/e;
		double x = (c-f)/(a-d);
		double y = (c-a*x)/b;
		x = ff(x);
		y = ff(y);
		cout<<setprecision(3)<<fixed<<x<<" "<<y<<endl;
	}
	return 0;
}

double ff(double r){
	r*=pow(10,3);
	r = round(r);
	r*=pow(10,-3);
	return r;
}