#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <sstream>
#include <cstdlib>
#include <cmath>
 
using namespace std;
 
int main(){
    double a, b, c, d, e, f;
    double x, y;
    while(cin >> a >> b >> c >> d >> e >> f){
    	x = (c * e - f * b) / (a * e - d * b);
    	y = (a * f - d * c) / (a * e - d * b);
    	if(abs(x) < 0.0001) x = 0;
    	if(abs(y) < 0.0001) y = 0;
    	printf("%.3f %.3f\n", x, y);
    }
    return 0;
}