#include<iostream>
#include<iomanip>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	cout<<setprecision(4);
	while(cin>>a>>b>>c>>d>>e>>f){
		y=(d*c-f*a)/(b*d-e*a);
		x=(c-b*y)/a;
		printf("%.3f %.2f%d",x,y);
	}
}