#include<iostream>
#include<cstdio>

/*
 * Wrong Answer
 * 2015-06-26 02:00
 */

int a, b, c, d, e, f;
double x, y;

int main(void)
{
	while( std::cin >> a >> b >> c >> d >> e >> f ){
		y = ( a * f - c * d ) / ( a * e - b * d );
		x = ( c - b * y ) / a;
		printf("%.3lf %.3lf\n", x, y );
	}

	return 0;
}