#include<iostream>
#include<iomanip>
using namespace std;

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