#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	float a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		y = (d*c - a*f)/(d*b - a*e);
		x = (f - e*y)/d;
	printf("%0.3f %0.3f \n",x,y);
	}
}