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