#include<iostream>
#include <iomanip>
using namespace std;
int main()
{
	int a,b,c,d,e,f;
	double x,y;
	while(cin>>a>>b>>c>>d>>e>>f,!cin.eof())
	{
		y = b/e;
		x = (y*f-c)/(y*d-a);
		y = (c-a*x)/b;
		cout.setf(ios::fixed);
		cout.precision(3); ;
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}