/*
	0004:Simultaneous Equation
*/
#include	<iostream>
#include	<cstdio>

using namespace std;

int main(void) {
	while(1) {
		double a, b, p, c, d, q;
		cin >> a >> b >> p >> c >> d >> q;
		
		if( cin.eof() ) { break; }
		
		printf("%.3f %.3f\n", (d * p - b * q) /(a * d - b * c), (a * q - c * p) / (a * d - b * c));
	}
	return 0;
}