#include<iostream>
#include<iomanip>
using namespace std;

int main(){
    int a,b,c,d,e,f;
    while( cin >> a >> b >> c >> d >> e >> f){
        double mom = a*e - b*d;
        double x = (e*c - b*f)/mom;
        double y = (-c*d + a*f)/mom;
        cout << fixed;
        cout << setprecision(3);
        if (x==0){
            x = 0;
        }
        if (y==0){
            y = 0;
        }
        cout << x << " "<< y << endl;
    }
    //double x = 0.51235;
    //cout << fixed;
    //cout << setprecision(2);
    //cout << x << endl;
}

