#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
#define EPS (5.0e-4)

double t;
double a,b,c,d,e,f;

void swap(double *a,double *b){
	double t=*a;
	*a=*b;
	*b=t;
}

int main(){
	cout<<setprecision(3)<<setiosflags(ios::fixed);
	while(cin>>a>>b>>c>>d>>e>>f){
		if(a==0){
			swap(a,d);
			swap(b,e);
			swap(c,f);
		}
		b/=a; c/=a; a=1;
		e-=d*b; f-=d*c; d=0;
		f/=e; e=1;
		c-=f*b; b=0;
		if(abs(c)<EPS) c=0;
		if(abs(f)<EPS) f=0;
		cout<<c<<" "<<f<<endl;
	}
	return 0;
}