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

int main(int argc, char *argv[]){
    double a,b,c,d,e,f;
	
	while(cin >> a>> b >> c>> d>> e >>f){
		double x,y;
		double b0,c0,e0,f0;

		b0=b*d; c0=c*d;
		e0=e*a; f0=f*a;
		
		y=(c0-f0)/(b0-e0);
		x=(c-b*y)/a;

		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
    return 0;
}