#include <iostream>
using namespace std;

int main(){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        double detA;
        detA = a * e - b * d;
        x = (c * e - f * b) / detA;
        y = (a * f - c * d) / detA;
        if(x>-0.001 && x<=0) x=0;
        if(y>-0.001 && y<=0) y=0;
        cout << x << " " << y << endl;
    }
}