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

int main()
{
	double a,b,c,d,e,f;
	double x,y;
	while(cin >> a >>b>>c>>d>>e>>f)
	{
		x= (b*f-c*e)/(b*d-a*e);
		y = (b*c*d-a*c*e-a*b*f+a*c*e)/(b*b*d-a*b*e);
		cout << fixed << setprecision(3) << x << " "  << y <<endl;
	}
	
	return 0;
}