#include<cstdio>
using namespace std;
int main(){
	double matrix[4],ans[2];
	while(scanf("%lf %lf %lf %lf %lf %lf",&matrix[0],&matrix[1],&ans[0],&matrix[2],&matrix[3],&ans[1]) != EOF){
		double t = matrix[0]*matrix[3]-matrix[1]*matrix[2];
		printf("%.3lf %.3lf\n",matrix[3]*ans[0]/t-matrix[1]*ans[1]/t,-matrix[2]*ans[0]/t+matrix[0]*ans[1]/t);
	}
	return 0;
}