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

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