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

int main(){
	
	double a, b, c, d, e, f, x=0, y=0; // ???????°???°?????°??? %f
	cin >> a >> b >> c >> d >> e >> f;

	x = (b*f-c*e)/(b*d-a*e);
	y = (a*f-c*d)/(a*e-b*d);

	printf("%.3f %.3f\n",x,y);
	
}