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

int main(){

	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f)
	{
		cout<<setprecision(3) << setiosflags(ios::fixed)<< (1.0*(c*e - b*f) / (e*a - b*d))<<" "
		<<(1.0*(d*c - a*f) / (b*d - a*e))<<endl;
	}
	

	
    return 0;
}