#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
	double a, b, c, d, e, f;
	double x, y;
	double g, h, i;

	while(cin >> a >> b >> c >> d >> e >> f){

		g = a * d;
		h = g / a;
		i = g / d;

		y = (h * c - i * f) / (h * b - i * e);

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


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

	}

	return 0;

}