#include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	double a, b, c, d, e, f;
	double x, y, z;
	while (scanf("%lf", &a) != EOF && scanf("%lf", &b) != EOF && scanf("%lf", &c) != EOF && scanf("%lf", &d) != EOF && scanf("%lf", &e) != EOF && scanf("%lf", &f) != EOF) {
		x = d / a;
		y = b * x-e;
		z = c * x-f;
		z = z / y;
		y = (c - b*z) / a;
		printf("%.3f %.3f\n",y, z);
	}


}
