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

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