#include <iostream>
#include <stdio.h>

using namespace std;

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

	while(cin >> a >> b >> c >> d >> e >> f){
			delta = (a * e) - (b * d);

			x = ((c * e) - (b * f)) / delta;
			y = ((a * f) - (c * d)) / delta;

			if(x * 10000 >= 5){
				x += 0.001;
			}if(y * 10000 >= 5){
				y += 0.001;
			}

		printf("%f %f\n", x , y);
	}

	return 0;
}