#define _CRT_SECURE_NO_WARNINGS
#include<cstdio>

int main(){
	double a, b, c, d, e, f;
	scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f);
	double y = (c * d - a * f) / (b * d - a * e);
	printf("%.3f %.3f", ((c - b * y) / a, y));
	return 0;
}