#include <cstdio>
#include <algorithm>
#include <iostream>
using namespace std;

// ax + by = c  ->  adx = cd - dby
// dx + ey = f  ->  adx = fa - aey

// (db - ae)y = cd - fa
// y = (cd - fa) / (db - ae)
// x = (c - by) / a

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