#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	double a, b, c, d, e, f,y;
	while (cin >> a >> b >> c >> d >> e >> f){
		for (y = -1000.0; y <= 1000.0; y++){
			if (f == d*(c - b*y) / a + e*y){
				break;
			}
		}
		double x = (c - b*y) / a;
		printf("%.3lf %.3lf\n", x, y);
	}
}