#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;

int main() {
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        printf("%.3lf %.3lf\n",round((b*f-c*e)/(b*d-a*e)*1000)/1000+EPS,round((c*d-a*f)/(b*d-a*e)*1000)/1000+EPS);
    }
    return 0;
}

