#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

//substitution
int main() {

int a,b,c,d,e,f,x,y;

	while(1) {
		cin >> a >> b >> c >> d >> e >> f;
		if ( cin.eof() ) {
			break;
		}
	//a*x + b*y = c  and d*x + e*y = f
	
	 float y =(a*f - c*d)/(a*e - b*d);
	 float x =(c*e - b*f)/(a*e - b*d);

	printf("%.3f %.3f\n", x,y);
	}

    return 0;
}