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

struct hoge{
	double a[2],b[2],c[2];
};

void coll(double a,double b,double c,double a2,double b2,double c2){
	double x, y;
	x = (c * b2 - b * c2) / (a * b2 - b * a2);
	y = (c2 * a - c * a2) / (a * b2 - a2 * b);
	if(x == 0){
		x = 0.000;
	}
	if(y == 0){
		y = 0.000;
	}

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

int main()
{
	hoge date;

	while(cin >> date.a[0] >> date.b[0] >> date.c[0] >> 
		date.a[1] >> date.b[1] >> date.c[1])
	{
		coll(date.a[0], date.b[0], date.c[0], date.a[1], date.b[1], date.c[1]);
	}
	return 0;
}