/*
	ax+by=c, dx+ey=fのx,y 
	x=(E1*B2-B1*E2)/(A1*B2-B1*A2)
	y=(E2*A1-E1*A2)/(A1*B2-A2*B1)
*/

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

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