#include<iostream>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;

int main(){
double a,b,c,d,e,f,x,y;
while(cin>>a>>b>>c>>d>>e>>f){
	x=0;
	y=0;
	x=double(double(double(c/b)-double(f/e))/double(double(a/b)-double(d/e)));
	y=double(double(double(c/a)-double(f/d))/double(double(b/a)-double(e/d)));
	cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
}
return 0;
}