#include<iostream>
#include<stdio.h>
using namespace std;
double a,b,c,d,e,f;
int main(){
	while(cin>>a>>b>>c>>d>>e>>f){
		double x=(double)(c/b-f/e)/(double)(a/b-d/e)+0.0005;
		double y=(double)(c/a-f/d)/(double)(b/a-e/d)+0.0005;
		if(x==-0){
			x=0;
		}
		if(y==-0){
			y=0;
		}	
		printf("%.3lf",x);
		cout<<" ";
		printf("%.3lf\n",y);
	}
	return 0;
}	
