#include <cstdio>
#include <iomanip>
#include <iostream>

using namespace std;

int main()
{
    //freopen("input.txt", "r", stdin);
    double a, b, c, d, e, f;
    while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)!= EOF){
        double x, y;
        x = ((b*f)-(c*e))/((b*d)-(a*e));
        y = (c-(a*x))/b;

       cout << setprecision(3) << x << " " << y << endl;
    }

    return 0;
}