#include<iostream>
#include<vector>
#include<deque>
using namespace std;

int main() {

     
    double a, b, c, d, e, f;

    while ( cin >> a >> b >> c >> d >> e >> f ) {
        double det = a * e - b * d;
        double x = (c * e - b * f) / det + 0.0;
        double y = (a * f - c * d) / det + 0.0;
        printf("%.3f %.3f", x, y);
        cout << endl;
    }

    return 0;
}