#include<bits/stdc++.h>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f)
	/*
	 	ax + by = c
        dx + ey = f
        
        y=(c-ax)/b
        dx+e/b*(c-ax)=f
        dx+e*c/b-e*a/b x=f
        (d-e*a/b)x=f-e*c/b
        x=(f-e*c/b)/(d-e*a/b)
        y=(f-d*c/a)/(e-d*b/a)
        					*/
    	cout<<setiosflags(ios::fixed)<<setprecision(3)<<(f-e*c/b)/(d-e*a/b)<<" "<<(f-d*c/a)/(e-d*b/a)<<endl;
	return 0;
}