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

int main()
{
        double a, b, c, d, e, f;
        double det;
        
        while( scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF ){
                det = a*e - b*d;
                printf("%.3lf %.3lf\n", (e*c-b*f)/det, (a*f-c*d)/det);
        }
        return 0;
}