#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d,e,f;
    while(cin >> a >> b >> c >> d >> e >> f) {
        int det = a*e - d*b;
        double x = (double)(c*e - b*f) / det;
        double y = (double)(a*f - c*d) / det;
        printf("%.3lf %.3lf\n", x, y);
    }
}