#include <iostream>
using namespace std;


int main () {

	double a,b,c,d,e,f;
	double x,y;
	
	while(cin>>a>>b>>c>>d>>e>>f){
	double ta=a;
	double tb=b;
	double tc=c;
	
	a*=d;
	b*=d;
	c*=d;
	d*=ta;
	e*=ta;
	f*=ta;
	if((b-d)==0)
		y=0;
	else{
		y=(c-f)/(b-e);
	}
	x=(tc-(tb*y))/ta;

	cout << x << " " << y << endl;
	}
	
    return 0;
}