#include <iostream>
#include <string>
#include<iomanip>
using namespace std;
int main(){
	double x,y;
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		x=(c-(b*f/e))/(a-(b*d/e));
		y=(c-a*x)/b;
        x*=1000;
        if(x>=0)
        x+=0.5;
		else
		x-=0.5;
        x=int(x);
        x/=1000;
	    y*=1000;
		if(y>=0)
        y+=0.5;
		else
		y-=0.5;
        y=int(y);
        y/=1000;
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}