#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = (c - b * f / e)/(a - b * d / e);
		double y = (c - a * x) / b;
		printf("%.3lf ", x);
		printf("%.3lf\n", y);
	}
	return 0;
}