#include<stdio.h>
#include<iostream>
#include<iomanip>

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        auto x=(c*e-b*f)/(a*e-b*d);
        auto y=(c-a*x)/b;
        if(x<0.00005) x=0;
        if(y<0.00005) y=0;
        printf("%.3f %.3f\n",x,y);
    }
}

int main() {
    solver();
    return 0;
}