#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 = ((h * c) - (h * b * y)) / (h * a);

		if(x == -0){
			x = -0 * (-1);
		}
		else if(y == -0){
			y = -0 * (-1);
		}

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

	}



}