#include <cstdio>
 
int main(void)
{
    double a, b, c, d, e, f;
 
    while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
        double y = (d * c - a * f) / (d * b - a * e);
        double x = (c - b * y) / a;
        printf("%.3f %.3f\n", x, y);
    }
 
    return 0;
}