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

int main()
{
	double x[2],y[2],z[2];
	double X,Y;

	while(cin >> x[0] >> y[0] >> z[0] >> x[1] >> y[1] >> z[1]){
		y[0] *= x[1];	z[0] *= x[1];
		y[1] *= x[0];	z[1] *= x[0];

	
		Y = (z[0]-z[1]) / (y[0]-y[1]);

		y[0] /= x[1];
		z[0] /= x[1];
		z[0] -= y[0] * Y;

		X = z[0]/x[0];

		cout << X << " "<< Y << endl;

	}
	return 0;
}