#include "bits/stdc++.h"
using namespace std;
int main(){
    double a, b, c, d, e, f;
    double x, y;
    while(cin >> a >> b >> c >> d >> e >> f){
        y = (c*d-a*f) / (b*d-a*e);
        x = (c-b*y) / a;
        cout << fixed << x << " " << y << endl;
    }
    return 0;
}