#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

int main(){

    double a, b, c, d, e, f;
    for(;cin >> a >> b >> c >> d >> e >> f;){
        double x = (e * c - b * f) / (a * e - b * d);
        double y = (-d * c + a * f) / (a * e - b * d);
        
        printf("%.3f %.3f\n", x+0.00000001, y+0.00000001);
    }

    return 0;
}
