#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <iomanip>
using namespace std;

int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = ( c*e - b*f ) / ( a*e - b*d ), y = ( c*d - a*f ) / ( b*d - a*e );
		cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
	}
}
