#include <iostream>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	int xx,yy;
	while(cin>>a>>b>>c>>d>>e>>f){
		x=(c*e-b*f)/(a*e-b*d);
		y=(a*f-c*d)/(a*e-b*d);
		cout<<(int)x<<"."<<(int)(x*10)-(int)x*10<<(int)(x*100)-(int)x*100<<(int)(x*1000)-(int)x*1000<<" "<<
			(int)y<<"."<<(int)(y*10)-(int)y*10<<(int)(y*100)-(int)y*100<<(int)(y*1000)-(int)y*1000<<endl;
	}
	return 0;
}