#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;


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