#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;

void pri(double a, double b, double c, double d, double e, double f){
	printf("(%4f)x + (%4f)y = (%4f)\n(%4f)x + (%4f)y = (%4f)\n\n", a, b, c, d, e, f);
}

int main(){
	double a, b, c, d, e, f, x, y;
	
	while(cin >>a >>b >>c >>d >>e >>f){
		
		b /= a; c /= a; a /= a;
		
		e -= d * b; f -= d * c;
		
		y = f / e;
		
		x = c - (b * y);
		
		if(x < 0) x = ceil(x * 1000 - 0.5) / 1000;
		else x = floor(x * 1000 + 0.5) / 1000;
		if(y < 0) y = ceil(y * 1000 - 0.5) / 1000;
		else y = floor(y * 1000 + 0.5) / 1000;
		
		printf("%.3f %.3f\n", x, y);
	}
	
	return 0;
}