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

int main(){

    double a,b,c,d,e,f;
    double x,y;
    
    while(cin){
        cin >> a >> b >> c >> d >> e >> f;
        
        
        x = (c * e - b * f) / (a * e - b * d);
        y = (a * f - c * d) / (a * e - b * d);

        cout << setiosflags(ios::fixed) << setprecision(3);
        cout << x << ' ' <<  y  << endl;
     }
         
	return 0;
}