#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>

using namespace std;

int main()
{
	double a,b,c,d,e,f,x,y;

	while(cin >> a >> b >> c >> d >> e >> f){
		if( ((b*f)-(e*c)) == 0){ x=0;}
		else{ x = ((b*f) - (e*c))/((b*d) - (e*a));}
		if( ((a*f)-(d*c)) == 0){y=0;}
		else { y = ((a*f) - (d*c))/((a*e) - (b*d));}
		printf("%.3f %.3f\n", x, y);
	}

	return 0;
}