#include<iostream>
using namespace std;

#include<iomanip>

void printSolution ( int,int,int,int,int,int ); 

int main (){

	int a,b,c,d,e,f;

	cout<<fixed<<setprecision(3);

	while ( cin>>a>>b>>c>>d>>e>>f ){

		printSolution ( a,b,c,d,e,f );
		cin>>a,b,c,d,e,f;
	}
	return 0;
}


void printSolution ( int a,int b,int c,int d,int e,int f )
{
	double x=(c*e-b*f)/(a*e-b*d);
	double y=(c*d-a*f)/(b*d-a*e);
	cout<<x<<"  "<<y<<endl;
}